Thank you for the reply it's working fine now ...
create or replace package body PMS_HRMS_LINK AS
Procedure Proc_HRMS_Employee(P_EMP_ID in Varchar2,
P_EMP_FNAME in Varchar2,
P_EMP_TYPE in Varchar2,
P_Joining_Date in Varchar2,
P_Birth_Date in Varchar2,
P_H_ID in number,
P_P_ID in number,
P_CREATED_USER_ID in Varchar2,
P_Op_flg in Varchar2,
P_Status in Varchar2,
P_DML_Msg out varchar2) As
Var_Emp_Exist number := 0;
Begin
Select count(*)
into Var_Emp_Exist
from td_hrms_employee p
where p.employee_id = P_EMP_ID
AND p.DATEOF_BIRTH = To_Date(P_Birth_Date, 'dd-mm-yyyy');
IF P_Status = 'Create' then
IF Var_Emp_Exist > 0 Then
P_DML_Msg := 'Employee Already Added:';
Return;
End if;
if Var_Emp_Exist = 0 Then
insert into td_hrms_employee
(P_ID,
EMPLOYEE_ID,
EMPLOYEE_FNAME,
EMPLOYEEMENT_TYPE,
DATEOF_JOINING,
CREATED_USER_ID,
OP_FLAG,
DATEOF_BIRTH,
H_ID)
VALUES
(P_P_ID,
P_EMP_ID,
P_EMP_FNAME,
P_EMP_TYPE,
To_Date(P_Joining_Date, 'DD/MM/YYYY'),
P_CREATED_USER_ID,
P_Op_flg,
To_Date(P_Birth_Date, 'DD/MM/YYYY'),
P_H_ID);
P_DML_Msg := 'Record Entered Successfully';
End if;
End if;
End Proc_HRMS_Employee;
End PMS_HRMS_LINK;
Stream responseStream = response.GetResponseStream();
using (var reader = new StreamReader(responseStream))
{
string responseText = reader.ReadToEnd();
var jsonResult = JsonConvert.DeserializeObject(responseText).ToString();
JObject _jsonResponse = JObject.Parse(jsonResult);
string EMP_NO = Convert.ToString(_jsonResponse["Table"][0]["EMP_NO"]);
string FULL_NAME = Convert.ToString(_jsonResponse["Table"][0]["FULL_NAME"]);
string EMPLOYMENT_STATUS = Convert.ToString(_jsonResponse["Table"][0]["EMPLOYMENT_STATUS"]);
string JOINING_DATE = Convert.ToString(_jsonResponse["Table"][0]["JOINING_DATE"]);
string DATE_OF_BIRTH = Convert.ToString(_jsonResponse["Table"][0]["DATE_OF_BIRTH"]);
data.EMP_NO = EMP_NO;
data.FULL_NAME = FULL_NAME;
data.DATE_OF_BIRTH = DATE_OF_BIRTH;
data.JOINING_DATE = JOINING_DATE;
data.EMPLOYMENT_STATUS = EMPLOYMENT_STATUS;
string Cuid = Session["Uname"].ToString();
data.CREATED_USER_ID = Cuid;
data.MODIFIED_USER_ID = Cuid;
data.H_ID = HID;
data.op1_flag = "I";
data.P_ID = int.Parse(pID1[i].ToString());
data.Status = ViewState["status"].ToString();
BL_HRMSDataProcess obj = new BL_HRMSDataProcess();
string status = obj.WebApi(data);
ClientScript.RegisterClientScriptBlock(this.GetType(), "", "alert('" + status + "'); ", true);
{
DataSet ds;
ds = obj.SelectEnteredData(pID1[i].ToString());
GridEmpID.DataSource = ds;
if (ds.Tables[0].Rows.Count == 0)
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "", "alert('No Record Found');", true);
}
GridEmpID.DataBind();
}
}