private void InitEvent() { client = new SmtOADocumentAdminClient(); client.AddLicenseBorrowCompleted += new EventHandler <AddLicenseBorrowCompletedEventArgs>(client_AddLicenseBorrowCompleted); client.GetLicenseBorrowListByIdCompleted += new EventHandler <GetLicenseBorrowListByIdCompletedEventArgs>(client_GetLicenseBorrowListByIdCompleted); client.UpdateLicenseBorrowCompleted += new EventHandler <UpdateLicenseBorrowCompletedEventArgs>(client_UpdateLicenseBorrowCompleted); //audit.AuditCompleted += new EventHandler<SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs>(audit_AuditCompleted); //audit.Auditing += new EventHandler<SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs>(audit_Auditing); if (action == Action.Add) { //LicenseViewObj = new V_LicenseBorrow(); //LicenseViewObj.licenseUser = new T_OA_LICENSEUSER(); LicenseObj = new T_OA_LICENSEUSER(); licenseObj.STARTDATE = DateTime.Now; licenseObj.ENDDATE = DateTime.Now.AddDays(7); //this.SumbitButton.Visibility = Visibility.Collapsed; //licenseObj = new T_OA_LICENSEUSER(); } else { if (action == Action.AUDIT) { actionFlag = DataActionFlag.SubmitComplete; } client.GetLicenseBorrowListByIdAsync(licenseID); } }
public LicenseBorrowReturn(Action action, T_OA_LICENSEUSER licenseObj) { InitializeComponent(); this.action = action; LicenseObj = licenseObj; InitEvent(); }
public bool LendOrReturn(T_OA_LICENSEUSER licenseObj, string action) { using (LicenseReturnBll licenseReturnBll = new LicenseReturnBll()) { return(licenseReturnBll.LendOrReturn(licenseObj, action)); } }
public LicenseBorrowReturn(Action action, T_OA_LICENSEUSER licenseObj) { InitializeComponent(); this.action = action; LicenseObj = licenseObj; InitEvent(); }
void dgLicense_CurrentCellChanged(object sender, EventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItem != null) { Licenseuser = (T_OA_LICENSEUSER)grid.SelectedItems[0];//获取当前选中的行数据并转换为对应的实体 } }
void dgLicense_SelectionChanged(object sender, SelectionChangedEventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItems.Count == 0) { return; } if (grid.SelectedItems.Count > 0) { Licenseuser = (T_OA_LICENSEUSER)grid.SelectedItems[0];//获取当前选中的行数据并转换为对应的实体 } }
public string UpdateLicenseBorrow(T_OA_LICENSEUSER licenseObj) { string returnStr = ""; using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll()) { if (!licenseBorrowBll.UpdateLicenseBorrow(licenseObj)) { returnStr = "更新数据失败"; } return(returnStr); } }
/// <summary> /// 获取记录 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void client_GetLicenseBorrowListByIdCompleted(object sender, GetLicenseBorrowListByIdCompletedEventArgs e) { try { if (e.Error == null) { if (e.Result != null) { //licenseViewObj = e.Result; LicenseObj = e.Result; if (action == Action.AUDIT) { //audit.XmlObject = DataObjectToXml<T_OA_LICENSEUSER>.ObjListToXml(LicenseObj, "OA"); } if (actionFlag == DataActionFlag.SubmitFlow) { actionFlag = DataActionFlag.SubmitComplete; //SumbitFlow(); return; } //T_OA_LICENSEMASTER licenseMaster = new T_OA_LICENSEMASTER(); //licenseMaster.LICENSENAME = licenseViewObj.LicenseName; this.txtLicenseName.Text = LicenseObj.T_OA_LICENSEMASTER.LICENSENAME; //BindAduitInfo(); RefreshUI(RefreshedTypes.AuditInfo); RefreshUI(RefreshedTypes.All); } } else { //HtmlPage.Window.Alert(e.Error.ToString()); //RefreshUI(RefreshedTypes.ProgressBar); Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message); } } catch (Exception ex) { //HtmlPage.Window.Alert(ex.ToString()); //RefreshUI(RefreshedTypes.ProgressBar); Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString()); } }
public string AddLicenseBorrow(T_OA_LICENSEUSER licenseObj) { string returnStr = ""; using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll()) { if (IsBorrowed(licenseObj.T_OA_LICENSEMASTER.LICENSEMASTERID)) { if (!licenseBorrowBll.AddLicenseBorrow(licenseObj)) { returnStr = "添加数据失败"; } } else { returnStr = "此证照已借出!"; } return(returnStr); } }
private void addForm_ReloadDataEvent() { Licenseuser = null; LoadData(); }
private void GridPager_Click(object sender, RoutedEventArgs e) { Licenseuser = null; LoadData(); }
private void browser_ReloadDataEvent() { Licenseuser = null; LoadData(); }
void dgLicense_CurrentCellChanged(object sender, EventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItem != null) { Licenseuser = (T_OA_LICENSEUSER)grid.SelectedItems[0];//获取当前选中的行数据并转换为对应的实体 } }
/// <summary> /// 获取记录 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void client_GetLicenseBorrowListByIdCompleted(object sender, GetLicenseBorrowListByIdCompletedEventArgs e) { try { if (e.Error == null) { if (e.Result != null) { //licenseViewObj = e.Result; LicenseObj = e.Result; if (action == Action.AUDIT) { //audit.XmlObject = DataObjectToXml<T_OA_LICENSEUSER>.ObjListToXml(LicenseObj, "OA"); } if (actionFlag == DataActionFlag.SubmitFlow) { actionFlag = DataActionFlag.SubmitComplete; //SumbitFlow(); return; } //T_OA_LICENSEMASTER licenseMaster = new T_OA_LICENSEMASTER(); //licenseMaster.LICENSENAME = licenseViewObj.LicenseName; this.txtLicenseName.Text = LicenseObj.T_OA_LICENSEMASTER.LICENSENAME; //BindAduitInfo(); RefreshUI(RefreshedTypes.AuditInfo); RefreshUI(RefreshedTypes.All); } } else { //HtmlPage.Window.Alert(e.Error.ToString()); //RefreshUI(RefreshedTypes.ProgressBar); Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), e.Error.Message); } } catch (Exception ex) { //HtmlPage.Window.Alert(ex.ToString()); //RefreshUI(RefreshedTypes.ProgressBar); Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), ex.ToString()); } }
public bool LendOrReturn(T_OA_LICENSEUSER licenseObj, string action) { using (LicenseReturnBll licenseReturnBll = new LicenseReturnBll()) { return licenseReturnBll.LendOrReturn(licenseObj, action); } }
private void btnRefresh_Click(object sender, RoutedEventArgs e) { Licenseuser = null; LoadData(); }
private void GridPager_Click(object sender, RoutedEventArgs e) { Licenseuser = null; LoadData(); }
private void addForm_ReloadDataEvent() { Licenseuser = null; LoadData(); }
private void btnRefresh_Click(object sender, RoutedEventArgs e) { Licenseuser = null; LoadData(); }
/// <summary> /// 根据传回的XML,添加证照印章外借记录 /// </summary> /// <param name="xele"></param> private static string LicenseuserAdd(IEnumerable<XElement> eGFunc) { try { if (eGFunc.Count() == 0) { return ""; } string strEmployeeID = string.Empty; string strOwnerID = string.Empty; string strOwnerPostID = string.Empty; string strOwnerDepartmentID = string.Empty; string strOwnerCompanyID = string.Empty; foreach (var q in eGFunc) { string strName = q.Attribute("Name").Value; switch (strName) { case "CREATEUSERID": strEmployeeID = q.Attribute("Value").Value; break; case "OWNERID": strOwnerID = q.Attribute("Value").Value; break; case "OWNERPOSTID": strOwnerPostID = q.Attribute("Value").Value; break; case "OWNERDEPARTMENTID": strOwnerDepartmentID = q.Attribute("Value").Value; break; case "OWNERCOMPANYID": strOwnerCompanyID = q.Attribute("Value").Value; break; } } string employeeid = strEmployeeID.Replace("{", "").Replace("}", ""); T_OA_LICENSEUSER entity = new T_OA_LICENSEUSER(); entity.LICENSEUSERID = Guid.NewGuid().ToString(); entity.CREATEDATE = DateTime.Now; entity.OWNERID = strOwnerID; entity.OWNERPOSTID = strOwnerPostID; entity.OWNERDEPARTMENTID = strOwnerDepartmentID; entity.OWNERCOMPANYID = strOwnerCompanyID; entity.CREATEUSERID = strOwnerID; entity.CREATEPOSTID = strOwnerPostID; entity.CREATEDEPARTMENTID = strOwnerDepartmentID; entity.CREATECOMPANYID = strOwnerCompanyID; LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll(); if (licenseBorrowBll.AddLicenseBorrow(entity)) { return entity.LICENSEUSERID; } else { string err = "Error"; return err; } } catch (Exception e) { string abc = "<OA>Message=[" + e.Message + "]" + "<OA>Source=[" + e.Source + "]<OA>StackTrace=[" + e.StackTrace + "]<OA>TargetSite=[" + e.TargetSite + "]"; Tracer.Debug(abc); return abc; } }
void dgLicense_SelectionChanged(object sender, SelectionChangedEventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItems.Count == 0) return; if (grid.SelectedItems.Count > 0 ) { Licenseuser = (T_OA_LICENSEUSER)grid.SelectedItems[0];//获取当前选中的行数据并转换为对应的实体 } }
public string AddLicenseBorrow(T_OA_LICENSEUSER licenseObj) { string returnStr = ""; using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll()) { if (IsBorrowed(licenseObj.T_OA_LICENSEMASTER.LICENSEMASTERID)) { if (!licenseBorrowBll.AddLicenseBorrow(licenseObj)) { returnStr = "添加数据失败"; } } else { returnStr = "此证照已借出!"; } return returnStr; } }
private void InitEvent() { client = new SmtOADocumentAdminClient(); client.AddLicenseBorrowCompleted += new EventHandler<AddLicenseBorrowCompletedEventArgs>(client_AddLicenseBorrowCompleted); client.GetLicenseBorrowListByIdCompleted += new EventHandler<GetLicenseBorrowListByIdCompletedEventArgs>(client_GetLicenseBorrowListByIdCompleted); client.UpdateLicenseBorrowCompleted += new EventHandler<UpdateLicenseBorrowCompletedEventArgs>(client_UpdateLicenseBorrowCompleted); //audit.AuditCompleted += new EventHandler<SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs>(audit_AuditCompleted); //audit.Auditing += new EventHandler<SMT.SaaS.FrameworkUI.AuditControl.AuditEventArgs>(audit_Auditing); if (action == Action.Add) { //LicenseViewObj = new V_LicenseBorrow(); //LicenseViewObj.licenseUser = new T_OA_LICENSEUSER(); LicenseObj = new T_OA_LICENSEUSER(); licenseObj.STARTDATE = DateTime.Now; licenseObj.ENDDATE = DateTime.Now.AddDays(7); //this.SumbitButton.Visibility = Visibility.Collapsed; //licenseObj = new T_OA_LICENSEUSER(); } else { if (action == Action.AUDIT) { actionFlag = DataActionFlag.SubmitComplete; } client.GetLicenseBorrowListByIdAsync(licenseID); } }
private void browser_ReloadDataEvent() { Licenseuser = null; LoadData(); }
public string UpdateLicenseBorrow(T_OA_LICENSEUSER licenseObj) { string returnStr = ""; using (LicenseBorrowBll licenseBorrowBll = new LicenseBorrowBll()) { if (!licenseBorrowBll.UpdateLicenseBorrow(licenseObj)) { returnStr = "更新数据失败"; } return returnStr; } }