/// <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 (!string.IsNullOrEmpty(_key)) { ht["ModifyDate"] = DateTime.Now; ht["ModifyUserId"] = RequestSession.GetSessionUser().UserId; ht["ModifyUserName"] = RequestSession.GetSessionUser().UserName; } else { ht["Property_Function"] = _Function; 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.ParmAlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
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("操作失败!"); } }
protected void Save_Click(object sender, EventArgs e) { string guid = CommonHelper.GetGuid; Hashtable ht = new Hashtable(); ht["User_Code"] = this.User_Code.Value; ht["User_Name"] = this.User_Name.Value; ht["User_Account"] = this.User_Account.Value; ht["User_Pwd"] = Md5Helper.MD5(this.User_Pwd.Value, 32); ht["User_Sex"] = this.User_Sex.Value; ht["Email"] = this.Email.Value; ht["Title"] = this.Title.Value; ht["User_Remark"] = this.User_Remark.Value; if (!string.IsNullOrEmpty(this._key)) { guid = this._key; ht["ModifyDate"] = DateTime.Now; if (ht["User_Pwd"].ToString() == Md5Helper.MD5("*************", 32)) { ht.Remove("User_Pwd"); } ht["ModifyUserId"] = RequestSession.GetSessionUser().UserId; ht["ModifyUserName"] = RequestSession.GetSessionUser().UserName; } else { ht["User_ID"] = guid; ht["CreateUserId"] = RequestSession.GetSessionUser().UserId; ht["CreateUserName"] = RequestSession.GetSessionUser().UserName; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Base_UserInfo", "User_ID", this._key, ht); if (IsOk) { IsOk = this.systemidao.Add_AppendPropertyInstance(guid, this.AppendProperty_value.Value.Split(new char[] { ';' })); if (IsOk) { IsOk = this.add_ItemForm(this.checkbox_value.Value.Split(new char[] { ',' }), guid); } } if (IsOk) { ShowMsgHelper.ParmAlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
protected void Button5_Click(object sender, EventArgs e) { int num = peridal.AddFlag(RequestSession.GetSessionUser().UserId.ToString(), UserID); if (num > 0) { ShowMsgHelper.ParmAlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
protected void Button2_Click(object sender, EventArgs e) { int num = peridal.ChangeStatus(UserID, "2"); if (num > 0) { ShowMsgHelper.ParmAlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
protected void Button3_Click(object sender, EventArgs e) { //上一个 int nextid = int.Parse(this.Label1.Text) - 1; Hashtable ht = (Hashtable)Session["Select"]; if (ht[nextid.ToString()] == null) { ShowMsgHelper.ParmAlertMsg("已经到第一条!"); } else { string nextuser = ht[nextid.ToString()].ToString(); string url = string.Format("/User/UserInfoView.aspx?key={0}&¤tid={1}", nextuser, nextid); Response.Redirect(url); } }
protected void Save_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.title.Value)) { ShowMsgHelper.ParmAlertMsg("标题不能为空!"); return; } if (string.IsNullOrEmpty(this.newsTypeID.Value)) { ShowMsgHelper.ParmAlertMsg("新闻类型不能为空!"); return; } if (string.IsNullOrEmpty(this.pubdate.Value)) { ShowMsgHelper.ParmAlertMsg("发布日期不能为空!"); return; } Hashtable ht = new Hashtable(); // ht = ControlBindHelper.GetWebControls(this.Page); ht["title"] = this.title.Value; ht["newsTypeID"] = this.newsTypeID.Value; ht["pubdate"] = this.pubdate.Value; ht["istop"] = this.istop.Value; ht["content"] = StringHelper.FormatTextArea(this.content.Value); if (string.IsNullOrEmpty(this._key)) { ht["newsID"] = CommonHelper.GetGuid; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("News", "newsID", this._key, ht); if (IsOk) { ShowMsgHelper.ParmAlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
protected void Save_Click(object sender, EventArgs e) { Hashtable ht = new Hashtable(); ht = ControlBindHelper.GetWebControls(this.Page); ht.Remove("acceptLevel"); ht["acceptLevel"] = StringHelper.FormatTextArea(this.acceptLevel.Value); if (string.IsNullOrEmpty(this._key)) { ht["ID"] = CommonHelper.GetGuid; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Specialty", "ID", this._key, ht); if (IsOk) { ShowMsgHelper.ParmAlertMsg("操作成功!"); } else { ShowMsgHelper.Alert_Error("操作失败!"); } }
/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Save_Click(object sender, EventArgs e) { string guid = CommonHelper.GetGuid; Hashtable ht = new Hashtable(); ht["User_Code"] = User_Code.Value; ht["User_Name"] = User_Name.Value; ht["User_Account"] = User_Account.Value; ht["User_Pwd"] = Md5Helper.MD5(User_Pwd.Value, 32); //Md5Helper.MD5(pwd, 32) ht["User_Sex"] = User_Sex.Value; ht["Email"] = Email.Value; //ht["Title"] = Title.Value; ht["User_Remark"] = User_Remark.Value; ht["birthday"] = birthday.Text; ht["Sage_b"] = Sage_b.Value; ht["join_date"] = join_date.Text; ht["out_date"] = out_date.Text; ht["work_flag"] = work_flag.Value; ht["Boss_id"] = GetIDFromName(Boss_id.Value); ht["Boss_Flag"] = Boss_Flag.Value; ht["ATS_Code"] = ATS_Code.Value; if (HR.Value != strHRtemp) { string strsql = "update Base_UserInfo set HR=0"; StringBuilder sbsql = new StringBuilder(strsql); DataTable dtsql = DataFactory.SqlDataBase().GetDataTableBySQL(sbsql); } ht["HR"] = HR.Value; if (work_flag.Value == "0") { ht["DeleteMark"] = 2; } else { ht["DeleteMark"] = 1; } if (!string.IsNullOrEmpty(_key)) { guid = _key; ht["ModifyDate"] = DateTime.Now; if (User_Pwd.Value == "*************") { ht.Remove("User_Pwd"); } ht["ModifyUserId"] = RequestSession.GetSessionUser().UserId; ht["ModifyUserName"] = RequestSession.GetSessionUser().UserName; } else { ht["User_ID"] = guid; ht["CreateUserId"] = RequestSession.GetSessionUser().UserId; ht["CreateUserName"] = RequestSession.GetSessionUser().UserName; } bool IsOk = DataFactory.SqlDataBase().Submit_AddOrEdit("Base_UserInfo", "User_ID", _key, ht); if (IsOk) { IsOk = systemidao.Add_AppendPropertyInstance(guid, AppendProperty_value.Value.Split(';')); if (IsOk) { IsOk = this.add_ItemForm(checkbox_value.Value.Split(','), guid); } } if (IsOk) { string strsql = "insert into Base_LeaveConsole(EmpID) select USER_ID from Base_UserInfo where USER_ID not in (select empid from Base_LeaveConsole)"; StringBuilder sbsql = new StringBuilder(strsql); DataFactory.SqlDataBase().ExecuteBySql(sbsql); ShowMsgHelper.ParmAlertMsg("Success!"); } else { ShowMsgHelper.Alert_Error("Error!"); } }