void client_GetBalancePostsByBalanceIDCompleted(object sender, GetBalancePostsByBalanceIDCompletedEventArgs e) { if (e.Error != null && !string.IsNullOrEmpty(e.Error.Message)) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } else { EmployeeAddBalancePost = e.asign; if (EmployeeAddBalancePost.NOTESCONTENT != null) { txtRemark.Text = EmployeeAddBalancePost.NOTESCONTENT; } if (EmployeeAddBalancePost.REMARK != null) { txtNotes.Text = EmployeeAddBalancePost.REMARK; } lkPost.Text = EmployeeAddBalancePost.BALANCEPOSTNAME; EmployeeBalanceInfoList.Clear(); if (e.Result != null) { listDetails = e.Result; EmployeeBalanceInfoList = listDetails; } if (FormType == FormTypes.Resubmit) { EmployeeAddBalancePost.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString(); } //issuanceExtOrgObj.Clear(); //entall.Clear(); //foreach (var ent in listDetails) //{ // ExtOrgObj objPerson = new ExtOrgObj(); // objPerson.ObjectID = ent.EMPLOYEEID; // objPerson.ObjectName = ent.EMPLOYEENAME +"-" +ent.EMPLOYEEPOSTNAME + "-"+ent.EMPLOYEEDEPARTMENTNAME +"-" + ent.EMPLOYEECOMPANYNAME; // objPerson.ObjectType = SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Personnel; // var ExistEnts = from ext in entall // where ext.ObjectID == objPerson.ObjectID // && ext.ObjectType == SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Personnel // select ext; // if (ExistEnts.Count() == 0) // { // entall.Add(objPerson); // } //} //issuanceExtOrgObj = entall; BindData(EmployeeBalanceInfoList.ToList()); //orgClient.GetPostByIdAsync(EmployeeAddBalancePost.BALANCEPOSTID); } RefreshUI(RefreshedTypes.HideProgressBar); RefreshUI(RefreshedTypes.All); if (FormType == FormTypes.Browse || FormType == FormTypes.Audit) { RefreshUI(RefreshedTypes.AuditInfo); } }
void client_GetBalancePostsByBalanceIDCompleted(object sender, GetBalancePostsByBalanceIDCompletedEventArgs e) { if (e.Error != null && !string.IsNullOrEmpty(e.Error.Message)) { ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } else { EmployeeAddBalancePost = e.asign; if (EmployeeAddBalancePost.NOTESCONTENT != null) { txtRemark.Text = EmployeeAddBalancePost.NOTESCONTENT; } if (EmployeeAddBalancePost.REMARK != null) { txtNotes.Text = EmployeeAddBalancePost.REMARK; } lkPost.Text = EmployeeAddBalancePost.BALANCEPOSTNAME; EmployeeBalanceInfoList.Clear(); if (e.Result != null) { listDetails = e.Result; EmployeeBalanceInfoList = listDetails; } if (FormType == FormTypes.Resubmit) { EmployeeAddBalancePost.CHECKSTATE = Convert.ToInt32(CheckStates.UnSubmit).ToString(); } //issuanceExtOrgObj.Clear(); //entall.Clear(); //foreach (var ent in listDetails) //{ // ExtOrgObj objPerson = new ExtOrgObj(); // objPerson.ObjectID = ent.EMPLOYEEID; // objPerson.ObjectName = ent.EMPLOYEENAME +"-" +ent.EMPLOYEEPOSTNAME + "-"+ent.EMPLOYEEDEPARTMENTNAME +"-" + ent.EMPLOYEECOMPANYNAME; // objPerson.ObjectType = SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Personnel; // var ExistEnts = from ext in entall // where ext.ObjectID == objPerson.ObjectID // && ext.ObjectType == SMT.SaaS.FrameworkUI.OrgTreeItemTypes.Personnel // select ext; // if (ExistEnts.Count() == 0) // { // entall.Add(objPerson); // } //} //issuanceExtOrgObj = entall; BindData(EmployeeBalanceInfoList.ToList()); //orgClient.GetPostByIdAsync(EmployeeAddBalancePost.BALANCEPOSTID); } RefreshUI(RefreshedTypes.HideProgressBar); RefreshUI(RefreshedTypes.All); if (FormType == FormTypes.Browse || FormType == FormTypes.Audit) { RefreshUI(RefreshedTypes.AuditInfo); } }