protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); if (string.IsNullOrEmpty(this.U_FingerData.Value.Trim()) || string.IsNullOrEmpty(this.Card_ID) || string.IsNullOrEmpty(this.U_FingerOCX.Value.Trim())) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('信息不完整!');</script>"); return; } if (!string.IsNullOrEmpty(this._key)) { ht["ModifyDate"] = DateTime.Now.ToString(); ht["ModifyUser"] = RequestSession.GetSessionUser().UserName.ToString(); } else { ht["Card_Id"] = this.Card_ID; ht["CreateUser"] = RequestSession.GetSessionUser().UserName.ToString(); } string FingerOcx = this.U_FingerOCX.Value.Trim(); string[] FingerOcxs = FingerOcx.Split('#'); int count = int.Parse(FingerOcxs[0]); for (int i = 1; i < count + 1; i++) { //string FingerData = FingerOcxs[i].Substring(2, FingerOcxs[i].Length - 2); // string[] Finger = FingerData.Split(';'); // ht[Finger[0]] = Finger[1]; string[] Fingers = FingerOcxs[i].Split(';'); switch (Fingers[0]) { case "1": case "3": ht[Fingers[1]] = Fingers[2]; break; case "2": ht[Fingers[1]] = ""; break; } } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("User_Finger", "Card_ID", this._key, ht); if (IsOk) { string Url = PageHelper.UrlEncrypt(this.Card_ID); ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存成功!');setTimeout('OpenClose()','2000');</script>"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
/// <summary> /// 确认事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Accept_Click(object sender, EventArgs e) { bool IsOk = false; bpms_qynumber = ControlBindHelper.GetWebControls <BPMS_QYNumber>(this.Page); if (!string.IsNullOrEmpty(_key))//判断是否编辑 { bpms_qynumber.QYId = _key; //bpms_qynumber.ModifyDate = DateTime.Now; //bpms_qynumber.ModifyUserId = RequestSession.GetSessionUser().UserId.ToString(); //bpms_qynumber.ModifyUserName = RequestSession.GetSessionUser().UserName.ToString(); IsOk = bpms_qynumberibll.Update(bpms_qynumber); if (IsOk) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0006); } } else { bpms_qynumber.QYId = CommonHelper.GetGuid; bpms_qynumber.CreateUserId = RequestSession.GetSessionUser().UserId.ToString(); bpms_qynumber.CreateUserName = RequestSession.GetSessionUser().UserName.ToString(); IsOk = bpms_qynumberibll.Insert(bpms_qynumber); if (IsOk) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0005); } } if (!IsOk) { ShowMsgHelper.Alert_Error(MessageHelper.MSG0022); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); if (string.IsNullOrEmpty(this.Card_Name.Value.Trim()) || string.IsNullOrEmpty(this.Card_ID.Value.Trim()) || string.IsNullOrEmpty(this.U_Age.Value.Trim())) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('信息不完整!');</script>"); return; } ht = ControlBindHelper.GetWebControls(this.Page); if (IsEdit) { ht["ModifyDate"] = DateTime.Now.ToString(); ht["ModifyUser"] = RequestSession.GetSessionUser().UserName.ToString(); ht["U_Tel"] = this.U_Tel.Value.Trim(); } else { ht["E_enterpriseID"] = this._key; ht["User_ID"] = RequestSession.GetSessionUser().UserId.ToString(); ht["Organization_ID"] = RequestSession.GetSessionUser().OrganizationID.ToString(); } string id = IsEdit ? this._key : ""; bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("EnterpriseOperator", "E_enterpriseID", id, ht); if (IsOk) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存成功!');setTimeout('OpenClose()','2000');</script>"); } else { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存失败!');</script>"); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); ht["Card_ID"] = this.Card_ID; if (string.IsNullOrEmpty(this.UL_Name.Value.Trim())) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('信息不完整!');</script>"); return; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Base_User_LiveWith", "Card_ID", this._key, ht); if (IsOk) { string Url = PageHelper.UrlEncrypt(this.Card_ID); ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存成功!');setTimeout('OpenClose()','2000');</script>"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
/// <summary> /// 确认事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Accept_Click(object sender, EventArgs e) { bool IsOk = false; bpms_button = ControlBindHelper.GetWebControls <BPMS_Button>(this.Page); bpms_button.Enabled = Enabled.Checked ? 1 : 0; bpms_button.Split = Split.Checked ? 1 : 0; if (!string.IsNullOrEmpty(_key))//判断是否编辑 { bpms_button.ButtonId = _key; bpms_button.ModifyDate = DateTime.Now; bpms_button.ModifyUserId = RequestSession.GetSessionUser().UserId; bpms_button.ModifyUserName = RequestSession.GetSessionUser().UserName; IsOk = bpms_buttonibll.Update(bpms_button); if (IsOk) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0006); } } else { bpms_button.ButtonId = CommonHelper.GetGuid; bpms_button.CreateUserId = RequestSession.GetSessionUser().UserId; bpms_button.CreateUserName = RequestSession.GetSessionUser().UserName; IsOk = bpms_buttonibll.Insert(bpms_button); if (IsOk) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0005); } } if (!IsOk) { ShowMsgHelper.Alert_Error(MessageHelper.MSG0022); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); if (string.IsNullOrEmpty(this.US_Card_ID.Value.Trim()) || string.IsNullOrEmpty(this.Card_ID) || string.IsNullOrEmpty(this.US_Card_Name.Value.Trim())) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('信息不完整!');</script>"); return; } if (!string.IsNullOrEmpty(this._key)) { ht["ModifyDate"] = DateTime.Now.ToString(); } else { ht["Card_Id"] = this.Card_ID; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Base_User_Spouses", "Card_ID", this._key, ht); if (IsOk) { // string Url = PageHelper.UrlEncrypt(this.Card_ID); ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>self.location='User_Spouse2.aspx?Card_ID=" + this.Card_ID + "';</script>"); // ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存成功!');setTimeout('OpenClose()','2000');</script>"); } else { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('操作失败!');</script>"); } }
/// <summary> /// 保存 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); if (ParentId.Value == "") { ht["ParentId"] = "0"; } if (!string.IsNullOrEmpty(_key)) { ht["ModifyDate"] = DateTime.Now; ht["ModifyUserId"] = RequestSession.GetSessionUser().UserId; ht["ModifyUserName"] = RequestSession.GetSessionUser().UserName; } else { ht["Organization_ID"] = CommonHelper.GetGuid; ht["CreateUserId"] = RequestSession.GetSessionUser().UserId; ht["CreateUserName"] = RequestSession.GetSessionUser().UserName; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Base_Organization", "Organization_ID", _key, ht); if (IsOk) { ShowMsgHelper.AlertMsg("Success!"); } else { ShowMsgHelper.Alert_Error("Error!"); } }
/// <summary> /// 确认事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Accept_Click(object sender, EventArgs e) { bool IsOk = false; qy_application = ControlBindHelper.GetWebControls <QY_Application>(this.Page); if (!string.IsNullOrEmpty(_key))//判断是否编辑 { qy_application.appId = Convert.ToInt32(_key); qy_application.ModifyDate = DateTime.Now; qy_application.ModifyUserId = RequestSession.GetSessionUser().UserId.ToString(); qy_application.ModifyUserName = RequestSession.GetSessionUser().UserName.ToString(); IsOk = qy_applicationibll.Update(qy_application); if (IsOk) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0006); } } else { qy_application.appId = Convert.ToInt32(CommonHelper.GetGuid); qy_application.CreateUserId = RequestSession.GetSessionUser().UserId.ToString(); qy_application.CreateUserName = RequestSession.GetSessionUser().UserName.ToString(); IsOk = qy_applicationibll.Insert(qy_application); if (IsOk) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0005); } } if (!IsOk) { ShowMsgHelper.Alert_Error(MessageHelper.MSG0022); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); if (string.IsNullOrEmpty(this.E_Rating.Value.Trim())) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('信息不完整!');</script>"); return; } ht = ControlBindHelper.GetWebControls(this.Page); if (!IsEdit) { ht["E_enterpriseID"] = this._key; } string id = IsEdit ? this._key : ""; bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("EnterpriseMore", "E_enterpriseID", id, ht); if (IsOk) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存成功!');setTimeout('OpenClose()','2000');</script>"); } else { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存失败!');</script>"); } }
/// <summary> /// 保存 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); ht["Property_Control_ID"] = 0; if (!string.IsNullOrEmpty(_key)) { ht["ModifyDate"] = DateTime.Now; ht["ModifyUserId"] = RequestSession.GetSessionUser().UserId; ht["ModifyUserName"] = RequestSession.GetSessionUser().UserName; } else { ht["Property_ID"] = CommonHelper.GetGuid; ht["CreateUserId"] = RequestSession.GetSessionUser().UserId; ht["CreateUserName"] = RequestSession.GetSessionUser().UserName; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Base_AppendProperty", "Property_ID", _key, ht); if (IsOk) { ShowMsgHelper.AlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); if (string.IsNullOrEmpty(this.E_enterpriseName.Value.Trim()) || string.IsNullOrEmpty(this.E_creditCode.Value.Trim()) || string.IsNullOrEmpty(this.E_frName.Value.Trim())) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('信息不完整!');</script>"); return; } ht = ControlBindHelper.GetWebControls(this.Page); if (!string.IsNullOrEmpty(this._key)) { ht["ModifyDate"] = DateTime.Now.ToString(); ht["ModifyUser"] = RequestSession.GetSessionUser().UserId.ToString(); } else { ht["User_ID"] = RequestSession.GetSessionUser().UserId.ToString(); ht["Organization_ID"] = RequestSession.GetSessionUser().OrganizationID.ToString(); } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Enterprise", "E_enterpriseID", this._key, ht); if (IsOk) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存成功!');setTimeout('OpenClose()','3000');</script>"); } else { // ShowMsgHelper.Alert_Error("操作失败!"); ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('操作失败!');</script>"); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); if (string.IsNullOrEmpty(this._key)) { ht["CreateUser"] = RequestSession.GetSessionUser().UserName.ToString(); } else { ht["ModifyDate"] = DateTime.Now.ToString(); ht["ModifyUser"] = RequestSession.GetSessionUser().UserName.ToString(); } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Contract_Template", "CTID", this._key, ht); if (IsOk) { ShowMsgHelper.AlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); ht["ModifyUserID"] = RequestSession.GetSessionUser().UserId.ToString(); ht["ModifyUser"] = RequestSession.GetSessionUser().UserName.ToString(); ht["ModifyDate"] = DateTime.Now.ToString(); if (string.IsNullOrEmpty(this.FID.Value.Trim()) || string.IsNullOrEmpty(this.FingerBase.Value.Trim()) || string.IsNullOrEmpty(this.SignBase.Value.Trim())) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('信息不完整!');</script>"); return; } ht.Remove("FID"); bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Contract_Finger", "FID", this.FID.Value.Trim(), ht); if (IsOk) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存成功!');</script>"); InitData(); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); if (IsExist) { key = this.UID; ht["ModifyUser"] = RequestSession.GetSessionUser().UserName.ToString(); ht["ModifyDate"] = DateTime.Now.ToString(); } else { ht["CreateUser"] = RequestSession.GetSessionUser().UserName.ToString(); ht["UID"] = UID; } if (string.IsNullOrEmpty(this.UV_Date.Value.Trim()) || string.IsNullOrEmpty(this.UV_Address.Value.Trim())) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('信息不完整!');</script>"); return; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("User_Interview", "UID", this.key, ht); if (IsOk) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存成功!');</script>"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
/// <summary> /// 确认事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Accept_Click(object sender, EventArgs e) { bool IsOk = false; base_news = ControlBindHelper.GetWebControls <BASE_News>(this.Page); base_news.Enabled = Enabled.Checked ? 1 : 0; if (!string.IsNullOrEmpty(_key))//判断是否编辑 { base_news.NewsId = _key; base_news.ModifyDate = DateTime.Now; base_news.ModifyUserId = RequestSession.GetSessionUser().UserId.ToString(); base_news.ModifyUserName = RequestSession.GetSessionUser().UserName.ToString(); IsOk = base_newsibll.Update(base_news); if (IsOk) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0006); } } else { base_news.ReadCount = 0; base_news.NewsId = CommonHelper.GetGuid; base_news.CreateUserId = RequestSession.GetSessionUser().UserId.ToString(); base_news.CreateUserName = RequestSession.GetSessionUser().UserName.ToString(); IsOk = base_newsibll.Insert(base_news); if (IsOk) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0005); } } if (!IsOk) { ShowMsgHelper.Alert_Error(MessageHelper.MSG0022); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); if (!IsEdit) { ht["UID"] = this._key; ht["CreateUser"] = RequestSession.GetSessionUser().UserName.ToString(); } else { ht["ModifyUser"] = RequestSession.GetSessionUser().UserName.ToString(); ht["ModifyDate"] = DateTime.Now.ToString(); } string id = IsEdit ? this._key : ""; bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Pledge_Estate", "UID", id, ht); if (IsOk) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存成功!');setTimeout('OpenClose()','2000');</script>"); } else { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存失败!');</script>"); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); //ht["ModifyUserID"] = RequestSession.GetSessionUser().UserId.ToString(); //ht["ModifyUser"] = RequestSession.GetSessionUser().UserName.ToString(); //ht["ModifyDate"] = DateTime.Now.ToString(); if (string.IsNullOrEmpty(this.ActName.Value.Trim()) || string.IsNullOrEmpty(this.Step.Value.Trim()) || string.IsNullOrEmpty(this.RoleId.Value.Trim())) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('信息不完整!');</script>"); return; } if (string.IsNullOrEmpty(this.PID)) { ht["FlowInfoId"] = FlowInfoId; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("WF_Activity", "id", this.PID, ht); if (IsOk) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存成功!');</script>"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
/// <summary> /// 确认事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Accept_Click(object sender, EventArgs e) { bool IsOk = false; bpms_employee = ControlBindHelper.GetWebControls <BPMS_Employee>(this.Page); bpms_employee.Enabled = Enabled.Checked ? 1 : 0; bpms_employee.IsDimission = IsDimission.Checked ? 1 : 0; bpms_employee.CompanyId = hiddenCompanyId.Value; bpms_employee.DepartmentId = hiddenDepartmentId.Value; bpms_employee.WorkgroupId = hiddenWorkgroupId.Value; bpms_employee.Spell = PinyinHelper.PinyinString(bpms_employee.RealName); if (!string.IsNullOrEmpty(_key))//判断是否编辑 { bpms_employee.EmployeeId = _key; bpms_employee.ModifyDate = DateTime.Now; bpms_employee.ModifyUserId = RequestSession.GetSessionUser().UserId; bpms_employee.ModifyUserName = RequestSession.GetSessionUser().UserName; IsOk = bpms_employeeibll.Update(bpms_employee); if (IsOk) { //保存成功后将数据同步到微信企业号 string[] tempDepart = new string[3] { bpms_employee.CompanyId, bpms_employee.DepartmentId, bpms_employee.WorkgroupId }; Extattr extattr = new Extattr(); extattr = null; if (!myCommFun.UpdateMember(bpms_employee.Code, bpms_employee.RealName, toDepartmentId(tempDepart), toPosition(bpms_employee.DutyId), bpms_employee.Mobile, toGender(bpms_employee.Gender), bpms_employee.Email, bpms_employee.WeixinId, Convert.ToInt32(bpms_employee.Enabled), bpms_employee.headpic, extattr)) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0032); } ShowMsgHelper.AlertParmCallback(MessageHelper.MSG0006); } } else { bpms_employee.EmployeeId = CommonHelper.GetGuid; bpms_employee.CreateUserId = RequestSession.GetSessionUser().UserId; bpms_employee.CreateUserName = RequestSession.GetSessionUser().UserName; IsOk = bpms_employeeibll.Insert(bpms_employee); if (IsOk) { //保存成功后将数据同步到微信企业号 string[] tempDepart = new string[3] { bpms_employee.CompanyId, bpms_employee.DepartmentId, bpms_employee.WorkgroupId }; Extattr extattr = new Extattr(); extattr = null; if (!myCommFun.CreateMember(bpms_employee.Code, bpms_employee.RealName, toDepartmentId(tempDepart), toPosition(bpms_employee.DutyId), bpms_employee.Mobile, toGender(bpms_employee.Gender), bpms_employee.Email, bpms_employee.WeixinId, bpms_employee.headpic, extattr)) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0032); } ShowMsgHelper.AlertParmCallback(MessageHelper.MSG0005); } } if (!IsOk) { ShowMsgHelper.Alert_Error(MessageHelper.MSG0022); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); if (string.IsNullOrEmpty(this.ID01.Value.Trim()) || string.IsNullOrEmpty(this.Card_ID) || string.IsNullOrEmpty(this.ID02.Value.Trim())) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('信息不完整!');</script>"); return; } if (this.ViewState["ID01"] != null) { if (this.ViewState["ID01"].Equals(this.ID01.Value)) { ht.Remove("ID01"); } } if (this.ViewState["ID02"] != null) { if (this.ViewState["ID02"].Equals(this.ID02.Value)) { ht.Remove("ID02"); } } if (ht.Count > 0) { if (!string.IsNullOrEmpty(this._key)) { ht["ModifyDate"] = DateTime.Now.ToString(); ht["ModifyUser"] = RequestSession.GetSessionUser().UserName.ToString(); } else { ht["Card_Id"] = this.Card_ID; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("User_Photo", "Card_ID", this._key, ht); if (IsOk) { this.Save.Enabled = false; Response.Redirect("User_Photo2.aspx?Card_ID=" + Card_ID); // string Url = PageHelper.UrlEncrypt(this.Card_ID); // ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>self.location='User_Photo2.aspx?Card_ID=" + Card_ID + "';</script>"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } } else { Response.Redirect("User_Photo2.aspx?Card_ID=" + Card_ID); } // ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>self.location='User_Photo2.aspx?Card_ID=';</script>"); }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); if (string.IsNullOrEmpty(this.Card_ID)) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('信息不完整!');</script>"); return; } if (this.ViewState["SceneHead"].Equals(this.SceneHead.Value)) { ht.Remove("SCENEHEAD"); } if (this.ViewState["SceneWorker"].Equals(this.SceneWorker.Value)) { ht.Remove("SCENEWORKER"); } if (this.ViewState["SceneGroup"].Equals(this.SceneGroup.Value)) { ht.Remove("SCENEGROUP"); } if (ht.Count > 0) { if (!string.IsNullOrEmpty(this._key)) { ht["ModifyDate"] = DateTime.Now.ToString(); ht["ModifyUser"] = RequestSession.GetSessionUser().UserName.ToString(); } else { ht["Card_Id"] = this.Card_ID; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("User_Photo", "Card_ID", this._key, ht); if (IsOk) { this.Save.Enabled = false; ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存成功!');setTimeout('OpenClose()','2000');</script>"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } } else { Response.Redirect("User_Photo2.aspx?Card_ID=" + Card_ID); } }
protected void Save_Click(object sender, EventArgs e) { string guid = CommonHelper.GetGuid; Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); ht.Remove("User_ID_Hidden"); if (this.ParentId.Value == "") { ht["ParentId"] = "0"; } if (!string.IsNullOrEmpty(this._key)) { guid = this._key; ht["ModifyDate"] = DateTime.Now; ht["ModifyUserId"] = RequestSession.GetSessionUser().UserId; ht["ModifyUserName"] = RequestSession.GetSessionUser().UserName; } else { ht["Roles_ID"] = guid; ht["CreateUserId"] = RequestSession.GetSessionUser().UserId; ht["CreateUserName"] = RequestSession.GetSessionUser().UserName; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Base_Roles", "Roles_ID", this._key, ht); if (IsOk) { string str = this.User_ID_Hidden.Value; if (!string.IsNullOrEmpty(str)) { str = this.User_ID_Hidden.Value.Substring(0, this.User_ID_Hidden.Value.Length - 1); } bool IsAllto = this.system_idao.Add_RoleAllotMember(str.Split(new char[] { ',' }), guid); if (IsAllto) { ShowMsgHelper.AlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); int IsOk = DataFactory.SqlDataBase().UpdateByHashtable("Base_ATS_HolidaySetting", "id", _key, ht); if (IsOk > 0) { ShowMsgHelper.AlertMsg("Success!"); } else { ShowMsgHelper.Alert_Error("Error!"); } }
/// <summary> /// 确认事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Accept_Click(object sender, EventArgs e) { bool IsOk = false; bpms_organization = ControlBindHelper.GetWebControls <BPMS_Organization>(this.Page); bpms_organization.Enabled = Enabled.Checked ? 1 : 0; bpms_organization.IsInnerOrganize = IsInnerOrganize.Checked ? 1 : 0; if (!string.IsNullOrEmpty(_key))//判断是否编辑 { bpms_organization.OrganizationId = _key; bpms_organization.ModifyDate = DateTime.Now; bpms_organization.ModifyUserId = RequestSession.GetSessionUser().UserId; bpms_organization.ModifyUserName = RequestSession.GetSessionUser().UserName; IsOk = bpms_organizationibll.Update(bpms_organization); if (IsOk) { //保存成功后将数据同步到微信企业号 if (!myCommFun.UpdateDepartment(Convert.ToInt32(bpms_organization.Code), bpms_organization.FullName, toQYParentId(bpms_organization.ParentId), Convert.ToInt32(bpms_organization.SortCode))) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0032); } ShowMsgHelper.AlertCallback(MessageHelper.MSG0006); } } else { bpms_organization.OrganizationId = CommonHelper.GetGuid; bpms_organization.ModifyUserId = RequestSession.GetSessionUser().UserId; bpms_organization.ModifyUserName = RequestSession.GetSessionUser().UserName; IsOk = bpms_organizationibll.Insert(bpms_organization); if (IsOk) { //保存成功后将数据同步到微信企业号 if (!myCommFun.CreateDepartment(Convert.ToInt32(bpms_organization.Code), bpms_organization.FullName, toQYParentId(bpms_organization.ParentId), Convert.ToInt32(bpms_organization.SortCode))) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0032); } bpms_datapermissionibll.AddItemDefault(RequestSession.GetSessionUser().RoleId, "Organization", bpms_organization.OrganizationId, RequestSession.GetSessionUser().UserId); ShowMsgHelper.AlertCallback(MessageHelper.MSG0005); } } if (!IsOk) { ShowMsgHelper.Alert_Error(MessageHelper.MSG0022); } }
protected void Save_Click(object sender, EventArgs e) { string guid = CommonHelper.GetGuid; Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); ht["FA_PurDate"] = Convert.ToDateTime(ht["FA_PurDate"].ToString()); if (!string.IsNullOrEmpty(ht["FA_Type_hidden"].ToString().Trim())) { ht["FA_Type"] = ht["FA_Type_hidden"]; } if (!string.IsNullOrEmpty(ht["FA_Status_hidden"].ToString().Trim())) { ht["FA_Status"] = ht["FA_Status_hidden"]; } ht.Remove("User_ID_Hidden"); ht.Remove("FA_Img_Hidden"); if (!string.IsNullOrEmpty(this._key)) { guid = this._key; ht["ModifyDate"] = DateTime.Now; ht["ModifyUserId"] = RequestSession.GetSessionUser().UserId; } ht.Remove("FA_Type_hidden"); ht.Remove("FA_Status_hidden"); ht.Remove("FA_Img_hidden"); bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("dbo.MMS_FixedAassets", "id", this._key, ht); if (IsOk) { ShowMsgHelper.AlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Contract_Select", "SL_ID", this._key, ht); if (IsOk) { ShowMsgHelper.AlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); int DelOK = DataFactory.SqlDataBase().DeleteData("Base_ATS_BaseSetting", "id", "1"); bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Base_ATS_BaseSetting", "id", _key, ht); if (IsOk) { ShowMsgHelper.AlertMsg("Success!"); } else { ShowMsgHelper.Alert_Error("Error!"); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); ht["Card_ID"] = this.Card_ID; switch (ht["U_Marry"].ToString()) { case "未婚": ht["U_Marry_SM"] = "1"; break; case "离婚": ht["U_Marry_SM"] = "2"; break; case "丧偶": ht["U_Marry_SM"] = "3"; break; default: ht["U_Marry_SM"] = "0"; break; } if (string.IsNullOrEmpty(this.U_Income.Value.Trim())) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('[月收入金额]需要填写!');</script>"); return; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Base_User_Ext", "Card_ID", this._key, ht); if (IsOk) { string Url = PageHelper.UrlEncrypt(this.Card_ID); ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存成功!');setTimeout('OpenClose()','3000');</script>"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
protected void btn_save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); if (string.IsNullOrEmpty(this.PRID)) { StringBuilder sb = new StringBuilder(); sb.Append("SELECT * FROM Pledge_Right WHERE UID=@UID"); SqlParam[] para = new SqlParam[] { new SqlParam("@UID", UID) }; DataTable dt = DataFactory.SqlDataBase().GetDataTableBySQL(sb, para); if (DataTableHelper.IsExistRows(dt)) { if (dt.Rows.Count >= 5) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('最多只能上传5条!');</script>"); return; } } } if (!string.IsNullOrEmpty(this.PRID)) { ht["ModifyUser"] = RequestSession.GetSessionUser().UserName.ToString(); ht["ModifyDate"] = DateTime.Now.ToString(); } else { ht["CreateUser"] = RequestSession.GetSessionUser().UserName.ToString(); ht["UID"] = UID; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Pledge_Right", "PRID", this.PRID, ht); if (IsOk) { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存成功!'); window.location.href = '/Contract/Contract_LDZJPGInfoForm3.aspx?UID=" + UID + "';</script>"); } else { ClientScript.RegisterStartupScript(Page.GetType(), "", "<script language=javascript>layer.msg('保存失败!');</script>"); } }
/// <summary> /// 确认事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Accept_Click(object sender, EventArgs e) { bool IsOk = false; bpms_user = ControlBindHelper.GetWebControls <BPMS_User>(this.Page); bpms_user.Enabled = Enabled.Checked ? 1 : 0; bpms_user.CompanyId = hiddenCompanyId.Value; bpms_user.DepartmentId = hiddenDepartmentId.Value; bpms_user.WorkgroupId = hiddenWorkgroupId.Value; bpms_user.RoleId = hiddenRoleId.Value; bpms_user.Spell = PinyinHelper.PinyinString(bpms_user.RealName); if (!string.IsNullOrEmpty(_key))//判断是否编辑 { bpms_user.UserId = _key; bpms_user.ModifyDate = DateTime.Now; bpms_user.ModifyUserId = RequestSession.GetSessionUser().UserId; bpms_user.ModifyUserName = RequestSession.GetSessionUser().UserName; bpms_user.Password = null; IsOk = bpms_useribll.Update(bpms_user); if (IsOk) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0006); } } else { bpms_user.UserId = CommonHelper.GetGuid; bpms_user.Secretkey = Md5Helper.MD5(CommonHelper.CreateNo(), 16); string Password = DESEncrypt.Encrypt(bpms_user.Password, bpms_user.Secretkey); bpms_user.Password = Md5Helper.MD5(Password, 32); bpms_user.CreateUserId = RequestSession.GetSessionUser().UserId; bpms_user.CreateUserName = RequestSession.GetSessionUser().UserName; IsOk = bpms_useribll.Insert(bpms_user); if (IsOk) { ShowMsgHelper.AlertCallback(MessageHelper.MSG0005); } } if (!IsOk) { ShowMsgHelper.Alert_Error(MessageHelper.MSG0022); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); if (Convert.ToString(ht["id"]) == "") { ht["id"] = "0"; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Base_HRM_BaseInfo", "index", _key, ht); if (IsOk) { ShowMsgHelper.AlertMsg("Success!"); } else { ShowMsgHelper.Alert_Error("Error!"); } }