Beispiel #1
0
 public void DeleteNews(string IDList)
 {
     if (new WSS.BLL.Tasks().DeleteList(IDList) == true)
     {
         GridPanelNewsList.Reload();
         Ext.Msg.Alert(ConfigurationManager.AppSettings["MsgTitle"], "数据删除成功!").Show();
     }
     else
     {
         Ext.Msg.Alert(ConfigurationManager.AppSettings["MsgError"], ConfigurationManager.AppSettings["ErrorMessage"]).Show();
     }
 }
        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();
            }
        }
        public void DeleteTasks(string IDList)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update [T_Tasks] set f_rowtype=1 ");
            strSql.Append(" where F_ID in (" + IDList + ") ");
            int isok = DbHelperSQL.ExecuteSql(strSql.ToString());

            if (isok > 0)
            {
                GridPanelNewsList.Reload();
                Ext.Msg.Alert(ConfigurationManager.AppSettings["MsgTitle"], "数据删除成功!").Show();
            }
            else
            {
                Ext.Msg.Alert(ConfigurationManager.AppSettings["MsgError"], ConfigurationManager.AppSettings["ErrorMessage"]).Show();
            }
        }
Beispiel #4
0
 private void AddNewsInfo(WSS.Model.Tasks n)
 {
     if (new WSS.BLL.Tasks().Add(n) > 0)
     {
         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();
     }
     else
     {
         Ext.Msg.Alert(ConfigurationManager.AppSettings["MsgError"], ConfigurationManager.AppSettings["ErrorMessage"]).Show();
     }
 }
        private void UpdateNewsInfoByID(WSS.Model.Tasks n)//修改操作
        {
            if (new WSS.BLL.Tasks().Update(n) == true)
            {
                WSS.BLL.T_TasksLog TLoglist = new WSS.BLL.T_TasksLog();

                TLoglist.F_ID = TList.F_ID;

                if (n.F_Note.Trim().Length != 0)
                {
                    TLoglist.F_Note = n.F_Note;
                }
                if (n.F_Title != TList.F_Title)
                {
                    TLoglist.F_Title = n.F_Title;
                }
                if (n.F_DateTime != TList.F_DateTime)
                {
                    TLoglist.F_DateTime = n.F_DateTime;
                }
                if (n.F_DutyMan != TList.F_DutyMan)
                {
                    TLoglist.F_DutyMan = n.F_DutyMan;
                }

                TLoglist.F_EditMan = TList.F_EditMan;
                if (n.F_From != TList.F_From)
                {
                    TLoglist.F_From = n.F_From;
                }
                if (n.F_GameName != TList.F_GameName)
                {
                    TLoglist.F_GameName = n.F_GameName;
                }
                if (n.F_JinjiLevel != TList.F_JinjiLevel)
                {
                    TLoglist.F_JinjiLevel = n.F_JinjiLevel;
                }
                if (n.F_PreDutyMan != TList.F_PreDutyMan)
                {
                    TLoglist.F_PreDutyMan = n.F_PreDutyMan;
                }
                if (n.F_Rowtype != TList.F_Rowtype)
                {
                    TLoglist.F_Rowtype = n.F_Rowtype;
                }
                if (n.F_State != TList.F_State)
                {
                    TLoglist.F_State = n.F_State;
                }
                if (n.F_Telphone != TList.F_Telphone)
                {
                    TLoglist.F_Telphone = n.F_Telphone;
                }
                if (n.F_Type != TList.F_Type)
                {
                    TLoglist.F_Type = n.F_Type;
                }

                TLoglist.Add();
                GridPanelNewsList.Reload();
                Ext.Msg.Alert(ConfigurationManager.AppSettings["MsgTitle"], "数据已经修改成功!").Show();
                NewsWindow.Hide();
            }
            else
            {
                Ext.Msg.Alert(ConfigurationManager.AppSettings["MsgError"], ConfigurationManager.AppSettings["ErrorMessage"]).Show();
            }
        }