public string Update_Click() { string rowid = GetSelectRowID(); if (!string.IsNullOrEmpty(rowid)) { string[] rowsid = rowid.Split(new char[] { ',' }); switch (rowsid.Length) { case 1: GetAction.Text = "edit"; WSS.Model.Tasks list = new WSS.BLL.Tasks().GetModel(Convert.ToInt32(rowsid[0])); txtTitle.Text = list.F_Title; cbType.Value = list.F_Type; cbFrom.Value = list.F_From; cbJinjiLevel.Value = list.F_JinjiLevel; cbGameName.Value = list.F_GameName; ////list.F_DateTime = DateTime.Now; txtTelphone.Text = list.F_Telphone; cbDutyMan.Value = list.F_DutyMan; cbDutyMan.Value = 2; return(list.F_Note); default: Ext.Msg.Alert(ConfigurationManager.AppSettings["MsgAlert"], "对不起,您在<span style=\"color:#F00;\">多行选中状态</span>下不能进行此操作,请选中一行!!").Show(); return(null); } } else { Ext.Msg.Alert(ConfigurationManager.AppSettings["MsgAlert"], "对不起,请选中数据行后执行此操作.").Show(); return(null); } }
private void AddNewsInfo(WSS.Model.Tasks n) { int tid = new WSS.BLL.Tasks().Add(n); if (tid > 0) { WSS.BLL.T_TasksLog a = new WSS.BLL.T_TasksLog(); a.F_ID = tid; a.F_Title = n.F_Title; a.F_Note = n.F_Note; a.F_From = n.F_From; a.F_Type = n.F_Type; a.F_JinjiLevel = n.F_JinjiLevel; a.F_GameName = n.F_GameName; a.F_GameZone = n.F_GameZone; a.F_GUserID = n.F_GUserID; a.F_GRoleName = n.F_GRoleName; a.F_Tag = n.F_Tag; a.F_State = n.F_State; a.F_Telphone = n.F_Telphone; a.F_DutyMan = n.F_DutyMan; a.F_PreDutyMan = n.F_PreDutyMan; a.F_DateTime = n.F_DateTime; a.F_EditMan = n.F_EditMan; a.F_Rowtype = n.F_Rowtype; a.Add(); GridPanelNewsList.Reload(); //Ext.Msg.Confirm(ConfigurationManager.AppSettings["MsgTitle"], "数据已经添加成功,是否继续添加?", new MessageBox.ButtonsConfig //{ // Yes = new MessageBox.ButtonConfig // { // Handler = "#{FormPanelNews}.getForm().reset();var oEditor = FCKeditorAPI.GetInstance('fckHtmlEditor');oEditor.SetHTML('');#{txtTitle}.focus(true);", // Text = "确 定" // }, // No = new MessageBox.ButtonConfig // { // Handler = "#{FormPanelNews}.getForm().reset();#{NewsWindow}.hide();", // Text = "取 消" // } //}).Show(); Ext.Msg.Alert(ConfigurationManager.AppSettings["MsgAlert"], "数据已经添加成功").Show(); WSS.BLL.AllOther.AddNotify("qq", "qqqqqq"); } else { Ext.Msg.Alert(ConfigurationManager.AppSettings["MsgError"], ConfigurationManager.AppSettings["ErrorMessage"]).Show(); } }
private void LoadData(string where)// 绑定StoreTasks数据源 { where += " order by f_datetime desc"; List <WSS.Model.Tasks> list = new WSS.BLL.Tasks().GetModelList(where); foreach (WSS.Model.Tasks ts in list) { if (ts.F_Note.Length > 25) { ts.F_Note = Server.HtmlDecode(ts.F_Note.Substring(0, 25)); } } this.StoreTasks.DataSource = list; this.StoreTasks.DataBind(); List <WSS.Model.Dictionary> lisd = new WSS.BLL.Dictionary().GetModelList("F_ParentID=100100 or F_ParentID=100101 "); StoreDic.DataSource = lisd; StoreDic.DataBind(); AllOther.ComboBoxDic(cbFrom, "100103"); AllOther.ComboBoxDic(cbJinjiLevel, "100104"); AllOther.ComboBoxDic(cbGameName, "100102"); AllOther.ComboBoxDic(cbType, "100101"); AllOther.ComboBoxDic(cbstate, "100100"); AllOther.ComboBoxUser(cbDutyMan, "1=1"); cbFrom.SelectedIndex = 0; cbJinjiLevel.SelectedIndex = 0; cbGameName.SelectedIndex = 0; cbstate.SelectedIndex = 0; GridPanelNewsList.SelectionMemory = SelectionMemoryMode.Auto; RowSelectionModel sm = this.GridPanelNewsList.SelectionModel.Primary as RowSelectionModel; sm.ClearSelections(); }