void button1_Click(object sender, EventArgs e) { if (FrameLib.CheckData(this.button1)) { BigStationBU.SetBigList(this.num.Text, this.bigname.Text); } }
void button1_Click(object sender, EventArgs e) { if (FrameLib.CheckData(button1)) { JTable tab1 = new JTable("MYUSERNAME"); Control[] con1 = new Control[] { num, password, UserName }; Dictionary <String, object> data1 = JControl.GetControlValuesToDictionary(con1); List <SearchField> condition = new List <SearchField>(); condition.Add(new SearchField("UserName", this.UserName.Text)); if (this.isAdmin.Checked) { data1.Add("isAdmin", "1"); } else { data1.Add("isAdmin", "0"); } tab1.EditData(data1, condition, true); tab1.Close(); //更新角色中的相关数据 JTable tab2 = new JTable(); tab2.TableName = "JROLEUSERS"; condition.Clear(); condition.Add(new SearchField("RoleID", "001")); condition.Add(new SearchField("UserID", this.UserName.Text.Trim())); DataTable dt1 = tab2.SearchData(condition, -1, "*").Tables[0]; if (this.isAdmin.Checked) { if (dt1.Rows.Count == 0) { DataRow dr1 = dt1.NewRow(); dr1["num"] = 1; dr1["id"] = WebFrame.Util.JString.GetUnique32ID(); dr1["userid"] = this.UserName.Text.Trim(); dr1["roleid"] = "001"; dt1.Rows.Add(dr1); tab2.Update(dt1); } } else { if (dt1.Rows.Count > 0) { DataRow dr1 = dt1.Rows[0]; dr1.Delete(); tab2.Update(dt1); } } tab2.Close(); JAjax.AlertAndGoUrl("提示:操作成功", button1.UrlReferrer); } }
//提交密码修改 protected void but1_Click(object sender, EventArgs e) { if (FrameLib.CheckData(this.but1)) { MyUserName bu1 = new MyUserName(); bool succ = bu1.UpdatePassWord(Page.User.Identity.Name, this.oldPass.Text, this.password1.Text); if (succ == false) { JAjax.Alert("错误:老密码输入不正确,请检查后重新输入!"); } else { JAjax.AlertAndGoUrl("提示:密码已成功修改,你需要重新登录!", "/SignOut.aspx"); } } }
void button1_Command(object sender, CommandEventArgs e) { if (FrameLib.CheckData(button1)) { button1.ExecutePara.Success = true; if (button1.ExecutePara.Success) { button1.JButtonType = JButtonType.SimpleAction; FrameLib.ExecuteJButton(button1); } else { FrameLib.ExecuteButtonInfo(button1); } } }
void button1_Click(object sender, EventArgs e) { if (FrameLib.CheckData(this.button1)) { Dictionary <String, object> data1 = new Dictionary <string, object>(); data1["num"] = this.num.Text.Trim(); data1["lineid"] = Request.QueryString["LineID"]; data1["linename"] = this.LineName.Text.Trim(); data1["jiaolu"] = this.JiaoLu.Text; if (this.fee1.Text.Trim() != String.Empty) { data1["fee1"] = int.Parse(this.fee1.Text.Trim()); } else { data1["fee1"] = 0; } if (this.fee2.Text.Trim() != String.Empty) { data1["fee2"] = int.Parse(this.fee2.Text.Trim()); } else { data1["fee2"] = 0; } ChangJiaoFeeBU bu1 = new ChangJiaoFeeBU(); bool succ = bu1.UpdateData(data1); this.button1.ExecutePara.Success = succ; FrameLib.ExecuteButtonInfo(this.button1); } }
void button1_Command(object sender, CommandEventArgs e) { if (FrameLib.CheckData(button1)) { button1.ExecutePara.Success = true; if (this.Line.Text.Trim() != String.Empty) { //检查线路的配置是否正确 String traintype = this.TrainType.Text.Trim(); ETrainType type1 = ETrainType.空调车25T; if (traintype == "动车组") { type1 = ETrainType.动车CRH2A; } else if (traintype == "空调特快") { type1 = ETrainType.空调车25T; } else if (traintype == "空调快速") { type1 = ETrainType.空调车25G; } else if (traintype == "空调普快") { type1 = ETrainType.空调车25G; } else if (traintype == "快速") { type1 = ETrainType.空调车25K; } else if (traintype == "普快") { type1 = ETrainType.绿皮车25B; } String[] lineNodes = this.Line.Text.Trim().Replace("-", ",").Split(','); TrainLine lineObj = BusinessRule.Line.GetTrainLineByTrainTypeAndLineNoeds(type1, false, lineNodes); if (lineObj != null) { if (lineObj.TotalMiles + "" != this.Mile.Text.Trim()) { button1.ExecutePara.Success = false; button1.ExecutePara.FailInfo = "错误:线路的距离设置错误,应为(" + lineObj.TotalMiles + "公里)!"; } } else { button1.ExecutePara.Success = false; button1.ExecutePara.FailInfo = "错误:线路的配置不对或线路不存在!"; } } if (button1.ExecutePara.Success) { button1.JButtonType = JButtonType.SimpleAction; FrameLib.ExecuteJButton(button1); } else { FrameLib.ExecuteButtonInfo(button1); } } }