/// <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); } }
/// <summary> /// 验证 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Landing_Click_Click(object sender, EventArgs e) { string connectstring = ""; string sql = string.Format("select name from sys.databases"); if (Authentication.Value == "1") { connectstring = string.Format(" data source={0}; initial catalog=master;integrated security=sspi", ServerName.Value); } else { connectstring = string.Format(" data source={0}; initial catalog=master;user id={1};password={2}", ServerName.Value, LoginName.Value, Password.Value); } try { DataTable dt = DataFactory.SqlHelper(connectstring.ToString()).GetDataTableBySQL(new StringBuilder(sql)); if (dt != null) { Session["connectstring"] = connectstring; Session["DBServerName"] = ServerName.Value; Session["DBLoginName"] = LoginName.Value; Session["DBPassword"] = Password.Value; ShowMsgHelper.ShowScript("Callback()"); } else { ShowMsgHelper.Alert_Error("用户登录失败(请检查用户名和密码)"); } } catch { ShowMsgHelper.Alert_Error("用户登录失败(请检查用户名和密码)"); } }
protected void btn_submit_Click(object sender, EventArgs e) { if (OriDataFile.PostedFile != null && OriDataFile.PostedFile.ContentLength > 0) { string fn = System.IO.Path.GetFileName(OriDataFile.PostedFile.FileName); string SaveLocation = Server.MapPath("OriATSFiles") + "\\" + fn; try { OriDataFile.PostedFile.SaveAs(SaveLocation); //Response.Write("The file has been uploaded."); ShowMsgHelper.AlertMsg("The file has been uploaded."); bind(SaveLocation); } catch (Exception ex) { //Response.Write("Error: " + ex.Message); ShowMsgHelper.Alert_Error("Error: " + ex.Message); } } else { //Response.Write("Please select a file to upload."); ShowMsgHelper.Alert_Error("Please select a file to upload."); } }
/// <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(); 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("操作失败!"); } }
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 Save_Click(object sender, EventArgs e) { try { Hashtable ht = new Hashtable(); ht["ID"] = _key; ht["OperateRemark"] = OperateRemark.Value; ht["OperateTime"] = SiteHelper.GetWebServerCurrentTime(); ht["OperatorID"] = RequestSession.GetSessionUser().UserId.ToString(); ht["OperatorType"] = 1; ht["AlarmStatus"] = 1; bool returnValue = alarmManager.AddOrEdit(ht, _key); if (returnValue) { ShowMsgHelper.AlertMsgNoFresh("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } } catch (Exception ex) { throw ex; } }
protected void Transfer_Click(object sender, EventArgs e) { try { bool result = true; int returnType = 1; /*Hashtable ht = depositManager.GetDataByID(_key); * string depositMoney = SiteHelper.GetHashTableValueByKey(ht, "DepositMoney"); * string depositPayWay = SiteHelper.GetHashTableValueByKey(ht, "DepositPayWay"); * string depositTradeNo = SiteHelper.GetHashTableValueByKey(ht, "DepositTradeNo"); * decimal refundMoney = 0.00m; * refundMoney = decimal.Parse(depositMoney);*/ if (result) { //result = depositManager.HandleReturnDeposit(_key, State.Value, Remark.Text.Trim(), RequestSession.GetSessionUser().UserName.ToString(), returnType); result = depositManager.HandleReturnedDeposit(_key, RequestSession.GetSessionUser().UserName.ToString()); if (result) { ShowMsgHelper.AlertMsgNoFresh("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } } } catch (Exception ex) { throw ex; } }
/// <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("操作失败!"); } }
/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht["User_Account"] = this.User_Account.Text.Trim(); ht["User_Name"] = this.User_Name.Text.Trim(); ht["User_Sex"] = User_Sex.Value; ht["Email"] = Email.Value; ht["Title"] = Title.Value; ht["Theme"] = Theme.Value; ht["User_Remark"] = User_Remark.Value; ht["ModifyDate"] = DateTime.Now; ht["ModifyUserId"] = Request.Cookies["dladmin_COOKIE"]["User_ID"].ToString(); ht["ModifyUserName"] = Request.Cookies["dladmin_COOKIE"]["User_Name"].ToString(); bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("ABase_UserInfo", "User_ID", Request.Cookies["dladmin_COOKIE"]["User_ID"].ToString(), ht); if (IsOk) { ShowMsgHelper.AlertClose("操作成功!"); } 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); //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 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!"); } }
protected void Save_Click(object sender, EventArgs e) { RechargeRules userManager = new RechargeRules(); Hashtable ht = new Hashtable(); ht["Name"] = Name.Value; ht["ChargeMoney"] = ChargeMoney.Value; ht["PresentMoney"] = PresentMoney.Value; ht["Sort"] = Sort.Value; ht["BeginTime"] = BeginTime.Value; ht["EndTime"] = EndTime.Value; ht["Operator"] = RequestSession.GetSessionUser().UserName; if (!string.IsNullOrEmpty(_key)) { ht["ID"] = _key; ht["UpdateTime"] = DateTime.Now; } else { ht["ID"] = CommonHelper.GetGuid; ht["CreateTime"] = DateTime.Now; } bool returnValue = userManager.AddOrEditSetting(ht, _key); if (returnValue) { ShowMsgHelper.AlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
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); 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("操作失败!"); } }
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("操作失败!"); } }
/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Save_Click(object sender, EventArgs e) { try { Hashtable ht = new Hashtable(); // ID ht["ID"] = this._key; // 绑定手机号 ht["BindPhone"] = BindPhone.Value.Trim(); // 解挂备注 ht["NoReportLossRemark"] = ReviewNote.Value.Trim(); // 解挂时间 ht["NoReportLossTime"] = SiteHelper.GetWebServerCurrentTime(); bool returnValue = userInfoManager.UserNoReportLoss(ht); if (returnValue) { ShowMsgHelper.AlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } } catch (Exception ex) { throw ex; } }
/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Save_Click(object sender, EventArgs e) { try { Hashtable ht = new Hashtable(); #region 初始化众筹申请信息 // 审核状态 ht["State"] = State.Value; // 审核描述 ht["ReviewNote"] = ReviewNote.Value; if (!string.IsNullOrEmpty(_key)) { ht["ID"] = _key; } #endregion bool returnValue = raiseReplyManager.AuditUserRaiseReplyInfo(ht); if (returnValue) { ShowMsgHelper.AlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } } catch (Exception ex) { throw ex; } }
protected void Save_Click(object sender, EventArgs e) { //领料单明细详情 var str = _key.Split(','); if (!string.IsNullOrEmpty(_key)) { //领料单明细详情 MMS_PurchasePlanDetail purPlanDetail = PurchasePlanService.Instance.GetInfoDetail(Convert.ToInt32(str[0])); purPlanDetail.OperatorDate = DateTime.Now; try { if (purPlanDetail.CheckQuantity == 0 && string.IsNullOrEmpty(purPlanDetail.AuditFlag)) { purPlanDetail.Quantity = Convert.ToInt32(quantity.Value); //purPlanDetail. if (Convert.ToInt32(quantity.Value) != Convert.ToInt32(str[1])) { PurchasePlanService.Instance.UpdateInfoDetail(purPlanDetail); ShowMsgHelper.AlertMsg("操作成功!"); } } else { ShowMsgHelper.Alert_Error("未发货状态才能修改数量!"); } } catch (Exception ex) { ShowMsgHelper.Alert_Error("请输入正确的数字!"); } } }
/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Save_Click(object sender, EventArgs e) { try { Hashtable ht = new Hashtable(); ht["Name"] = Name.Value; ht["Address"] = Address.Value; ht["Tel"] = Tel.Value; ht["Contacts"] = Contacts.Value; ht["Category"] = Category.Value; if (!string.IsNullOrEmpty(_key)) { ht["ID"] = _key; } else { ht["ID"] = CommonHelper.GetGuid; ht["Createtime"] = DateTime.Now; //ht["Balance"] = "0"; } bool returnValue = customerManager.AddOrEditCustomer(ht, _key); if (returnValue) { ShowMsgHelper.AlertMsgNoFresh("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } } catch (Exception ex) { throw ex; } }
protected void btn_submit_Click(object sender, EventArgs e) { if (FilesAdd.PostedFile != null && FilesAdd.PostedFile.ContentLength > 0) { //string fn = System.IO.Path.GetFileName(FileAdd.PostedFile.FileName); string fn = string.Format("{0:yyyyMMddHHmmssffff}", DateTime.Now) + "_" + System.IO.Path.GetFileName(FilesAdd.PostedFile.FileName); string SaveLocation = Server.MapPath("LeaveFiles") + "\\" + fn; try { FilesAdd.PostedFile.SaveAs(SaveLocation); txt_FilesAdd = SaveLocation; //Response.Write("The file has been uploaded."); ShowMsgHelper.Alert("The file has been uploaded."); } catch (Exception ex) { //Response.Write("Error: " + ex.Message); ShowMsgHelper.Alert_Error("Error: " + ex.Message); } } else { //Response.Write("Please select a file to upload."); ShowMsgHelper.Alert_Wern("Please select a file to upload."); } }
/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Save_Click(object sender, EventArgs e) { try { // 状态 int userState = Convert.ToInt32(UserState.Value); // 审核描述 string remark = ReviewNote.Value; // 用户ID string userID = _key; bool returnValue = userInfoManager.UserReportLoss(userID, userState, remark); if (returnValue) { ShowMsgHelper.AlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } } catch (Exception ex) { throw ex; } }
/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Save_Click(object sender, EventArgs e) { try { Hashtable ht = new Hashtable(); // 状态 ht["State"] = selState.Value; // 审核描述 ht["ReviewNote"] = txtRemark.Value; if (!string.IsNullOrEmpty(_key)) { ht["ID"] = _key; } VehicleCommentsLogManager vehicleCommentsManager = new VehicleCommentsLogManager(); bool returnValue = vehicleCommentsManager.AddOrEditVehicleCommentsLogInfo(ht, _key); if (returnValue) { ShowMsgHelper.AlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } } catch (Exception ex) { throw ex; } }
/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Save_Click(object sender, EventArgs e) { try { Hashtable ht = new Hashtable(); ht["FaultDoState"] = (int)VehicleFaultDoState.Disposed; ht["FaultDoTime"] = SiteHelper.GetWebServerCurrentTime(); ht["FaultDoUserID"] = RequestSession.GetSessionUser().UserId; ht["FaultDoUserName"] = RequestSession.GetSessionUser().UserName; if (!string.IsNullOrEmpty(_key)) { ht["ID"] = _key; } else { ht["ID"] = CommonHelper.GetGuid; ht["CreateTime"] = DateTime.Now; } bool returnValue = faultManager.AddOrEditVehicleFaultInfo(ht, _key); if (returnValue) { ShowMsgHelper.AlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } } catch (Exception ex) { throw ex; } }
/// <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(); // ht = ControlBindHelper.GetWebControls(this.Page); ht["COMPANYNAME"] = this.companyName.Value; ht["COMPANYTYPE"] = this.companyType.Value; ht["BEGINDATE"] = this.BeginDate.Value; ht["ENDDATE"] = this.EndDate.Value; ht["DELETEMARK"] = this.DeleteMark.Value; ht["INTRODUCTION"] = StringHelper.FormatTextArea(this.Introduction.Value); if (string.IsNullOrEmpty(this._key)) { ht["companyID"] = CommonHelper.GetGuid; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Company", "companyID", this._key, ht); if (IsOk) { ShowMsgHelper.ParmAlertMsg("操作成功!"); } 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>"); }
/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Save_Click(object sender, EventArgs e) { try { Hashtable ht = new Hashtable(); #region 初始化维修站信息 // 名称 ht["Name"] = Name.Value; // 地址 ht["Address"] = Address.Value; // 固定电话 ht["TelePhone"] = Telephone.Value; // 手机号 ht["Mobile"] = Mobile.Value; // 经度 ht["Longitude"] = Longitude.Value; // 纬度 ht["Latitude"] = Latitude.Value; // 停车场描述 ht["Description"] = Description.Value; // 操作人员ID ht["OwnerID"] = RequestSession.GetSessionUser().UserId.ToString(); // 状态(1可用 2不可用) ht["State"] = "1"; // 维修站维修人员 string userIDs = Request["chkUserID"]; bool returnValue = false; if (!string.IsNullOrEmpty(_key)) { ht["ID"] = _key; returnValue = pitsManager.EditPitsInfo(ht, _key, userIDs != null ? userIDs.Split(',') : null); } else { ht["ID"] = CommonHelper.GetGuid; ht["CreateTime"] = DateTime.Now; ht["DeleteMark"] = "0"; returnValue = pitsManager.AddPitsInfo(ht, _key, userIDs != null ? userIDs.Split(',') : null); } #endregion if (returnValue) { ShowMsgHelper.AlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } } catch (Exception ex) { throw ex; } }