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 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")); //} }