void client_GetVcomplainRecordByIDCompleted(object sender, GetVcomplainRecordByIDCompletedEventArgs e) { if (e.Error != null && e.Error.Message != null) { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("ERRORINFO"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error); } else { V_COMPLAINRECORD v = e.Result as V_COMPLAINRECORD; if (v != null) { kpirecord = v.T_HR_KPIRECORD; KPIRecordComplain = v.T_HR_KPIRECORDCOMPLAIN; try { txtComplainName.Text = v.EMPLOYEECNAME; txtflowid.Text = string.IsNullOrEmpty(v.FLOWID) ? string.Empty : v.FLOWID; txtInitScroe.Text = v.T_HR_KPIRECORDCOMPLAIN.INITIALSCORE != null?v.T_HR_KPIRECORDCOMPLAIN.INITIALSCORE.ToString() : string.Empty; txtScroe.Text = v.T_HR_KPIRECORDCOMPLAIN.REVIEWSCORE != null?v.T_HR_KPIRECORDCOMPLAIN.REVIEWSCORE.ToString() : string.Empty; txtMark.Text = string.IsNullOrEmpty(v.T_HR_KPIRECORDCOMPLAIN.COMPLAINREMARK) ? string.Empty : v.T_HR_KPIRECORDCOMPLAIN.COMPLAINREMARK; } catch { } } RefreshUI(RefreshedTypes.AuditInfo); SetToolBar(); } }
public ComplainRecordForm(FormTypes type, V_COMPLAINRECORD entity) { InitializeComponent(); FormType = type; kpirecord = new T_HR_KPIRECORD(); kpirecord = entity.T_HR_KPIRECORD; KPIRecordComplain = entity.T_HR_KPIRECORDCOMPLAIN; try { txtComplainName.Text = entity.EMPLOYEECNAME; txtflowid.Text = entity.FLOWID; txtInitScroe.Text = entity.T_HR_KPIRECORDCOMPLAIN.INITIALSCORE.ToString(); txtScroe.Text = entity.T_HR_KPIRECORDCOMPLAIN.REVIEWSCORE.ToString(); txtMark.Text = entity.T_HR_KPIRECORDCOMPLAIN.COMPLAINREMARK.ToString(); } catch { } //InitParas(); }
void BtnView_Click(object sender, RoutedEventArgs e) { if (DtGrid.SelectedItems.Count > 0) { V_COMPLAINRECORD tmpEnt = DtGrid.SelectedItems[0] as V_COMPLAINRECORD; //Form.Performance.ComplainRecordForm form = new Form.Performance.ComplainRecordForm(FormTypes.Audit, tmpEnt); Form.Performance.ComplainRecordForm form = new Form.Performance.ComplainRecordForm(FormTypes.Browse, tmpEnt.T_HR_KPIRECORDCOMPLAIN.COMPLAINID); //form.IsEnabled = false; EntityBrowser browser = new EntityBrowser(form); browser.MinHeight = 230; browser.FormType = FormTypes.Browse; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } else { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "EDIT")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "VIEW"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } //if (DtGrid.SelectedItems.Count > 0) //{ // V_COMPLAINRECORD tmpEnt = DtGrid.SelectedItems[0] as V_COMPLAINRECORD; // Form.Performance.ComplainRecordForm form = new Form.Performance.ComplainRecordForm(FormTypes.Browse, tmpEnt.T_HR_KPIRECORDCOMPLAIN.COMPLAINID); // //form = new SMT.HRM.UI.Form.Salary.EmployeeSalaryRecordForm(FormTypes.Browse, tmpEnt.EMPLOYEESALARYRECORDID); // form.IsEnabled = false; // EntityBrowser browser = new EntityBrowser(form); // browser.MinHeight = 230; // browser.FormType = FormTypes.Audit; // browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); // browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); //} //else //{ // Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "EDIT")); //} }
void btnDelete_Click(object sender, RoutedEventArgs e) { #region ----- string Result = ""; if (DtGrid.SelectedItems.Count > 0) { V_COMPLAINRECORD tmpEnt = DtGrid.SelectedItems[0] as V_COMPLAINRECORD; if (tmpEnt.T_HR_KPIRECORDCOMPLAIN.CHECKSTATE == "0" || tmpEnt.T_HR_KPIRECORDCOMPLAIN.CHECKSTATE == "3") { System.Collections.ObjectModel.ObservableCollection <string> ids = new System.Collections.ObjectModel.ObservableCollection <string>(); foreach (V_COMPLAINRECORD tmp in DtGrid.SelectedItems) { ids.Add(tmp.T_HR_KPIRECORDCOMPLAIN.COMPLAINID); } ComfirmWindow com = new ComfirmWindow(); com.OnSelectionBoxClosed += (obj, result) => { client.ComplainRecordDeleteAsync(ids); }; com.SelectionBox(Utility.GetResourceStr("DELETECONFIRM"), Utility.GetResourceStr("DELETEALTER"), ComfirmWindow.titlename, Result); } else { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTDELETE")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("NOTDELETE"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } } else { //Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "DELETE")); ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "DELETE"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation); } #endregion }