protected bool SaveCollaborator() { TTSHWCFServiceClient cl = new TTSHWCFServiceClient(); Contract_Collobrator_Master ccm = new Contract_Collobrator_Master(); string result = string.Empty; try { ccm.i_ID = 0; ccm.s_Name = TxtNCollabator.Text; ccm.s_Email1 = TxtNEmail1.Text; ccm.s_Institution = TxtNInstitution.Text; ccm.s_Email2 = TxtNEmail2.Text; ccm.s_PhoNo = TxtNPhNo.Text; if (HdnNCountryId.Value != "") { ccm.i_Country_ID = Convert.ToInt32(HdnNCountryId.Value); } result = cl.Contract_Collobrator_Master_DML(ccm, "Insert"); if (result.Split('|')[0].ToLower().Trim() == "success" && result.Split('|')[1].ToLower().Trim().CheckInt() == true) { this.PopUpMsg("Collaborator Details Saved Successfully", "CallNCollaboratorDetails()"); //switch ( HdnMode.Value.ToLower() ) // { // case "update": this.PopUpMsg("Collaborator Update Successfully..!!", "CallNCollaboratorDetails();"); break; // case "delete": this.PopUpMsg("Collaborator Delete Successfully..!!", "CallNCollaboratorDetails()"); break; // case "insert": this.PopUpMsg(" Collaborator Save Successfully..!!", "CallNCollaboratorDetails()"); break; // } } else { this.MsgBox(result.Split('|')[1]); return(false); } } catch (Exception ex) { this.MsgBox(ex.Message); return(false); } return(true); }
protected bool SaveCollaborator() { TTSHWCFServiceClient cl = new TTSHWCFServiceClient(); Contract_Collobrator_Master ccm = new Contract_Collobrator_Master(); string result = string.Empty; try { ccm.i_ID = 0; ccm.s_Name = TxtNCollabator.Text; ccm.s_Email1 = TxtNEmail1.Text; ccm.s_Institution = TxtNInstitution.Text; ccm.s_Email2 = TxtNEmail2.Text; ccm.s_PhoNo = TxtNPhNo.Text; if (HdnNCountryId.Value != "") { ccm.i_Country_ID = Convert.ToInt32(HdnNCountryId.Value); } result = cl.Contract_Collobrator_Master_DML(ccm, "Insert"); if (result.Split('|')[0].ToLower().Trim() == "success" && result.Split('|')[1].ToLower().Trim().CheckInt() == true) { this.PopUpMsg("Collaborator Details Saved Successfully", "CallNCollaboratorDetails()"); //switch ( HdnMode.Value.ToLower() ) // { // case "update": this.PopUpMsg("Collaborator Update Successfully..!!", "CallNCollaboratorDetails();"); break; // case "delete": this.PopUpMsg("Collaborator Delete Successfully..!!", "CallNCollaboratorDetails()"); break; // case "insert": this.PopUpMsg(" Collaborator Save Successfully..!!", "CallNCollaboratorDetails()"); break; // } } else { this.MsgBox(result.Split('|')[1]); return false; } } catch (Exception ex) { this.MsgBox(ex.Message); return false; } return true; }