Hello all,
I have to create Hr applicant from visual studio web site.
For that I created One Query and create document service . write code below to create applicant website .
when I run this ,it gives me error “Creation has been canceled”
so please tell me how can I solve the problem and create applicant.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ServiceReference1;
using System.Text;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string FName;
string Mname;
string LName;
int count = 0;
AxdApplicantQ CreateApplicant = new AxdApplicantQ();
ApplicantQServiceClient client = new ApplicantQServiceClient();
AxdEntity_HcmApplicant hcmApplicant = new AxdEntity_HcmApplicant();
AxdEntity_DirPersonName dirPersonname = new AxdEntity_DirPersonName();
AxdEntity_DirPerson_DirPerson dirperson = new AxdEntity_DirPerson_DirPerson();
AxdEntity_DirPersonName dirpersonname = new AxdEntity_DirPersonName();
CallContext callcontext = new CallContext();
//AxdEntity_InventDim inventDim = new AxdEntity_InventDim();
EntityKey[] keys = new EntityKey[1];
EntityKey key = new EntityKey();
KeyField field = new KeyField();
hcmApplicant = new ServiceReference1.AxdEntity_HcmApplicant();
hcmApplicant.DirPerson = new AxdEntity_DirPerson_DirPerson[] { dirperson };
dirperson.DirPersonName = new AxdEntity_DirPersonName[] { dirpersonname };
CreateApplicant.HcmApplicant = new AxdEntity_HcmApplicant[] { hcmApplicant };
FName = TextBox1.Text;
Mname = TextBox2.Text;
LName = TextBox3.Text;
dirPersonname.FirstName = TextBox1.Text;
dirPersonname.MiddleName = TextBox2.Text;
dirPersonname.LastName = TextBox3.Text;
TextBox4.Text = TextBox1.Text + “” + TextBox3.Text;
dirperson.NameAlias = TextBox4.Text;
callcontext.Company = “USMF”;
callcontext.Language = “en-us”;
keys = client.create(callcontext, CreateApplicant);
key = keys[0];
field = key.KeyData[0];
count++;
}
}
Thank You.