Exemple #1
0
 /// <summary>
 /// 创建公告
 /// </summary>
 /// <param name="notices">公告信息</param>
 public static void CreateNotices(Notices notices)
 {
     DataCommand cmd = DataCommandManager.GetDataCommand("CreateNotices");
     cmd.SetParameterValue<Notices>(notices);
     cmd.ExecuteNonQuery();
     var sysNo = (int)cmd.GetParameterValue("@SysNo");
 }
        public void btnSave_ServerClick(object sender, EventArgs e)
        {
            string contents = txtContents.Text;
            string rank = txtRank.Value;

            if (string.IsNullOrEmpty(contents))
            {
                Alert("请输入公告内容!");
                return;
            }

            if (string.IsNullOrEmpty(rank))
            {
                Alert("请输入优先级!");
                return;
            }

            Notices notices = new Notices()
            {
                Contents = contents,
                Rank = rank,
                Status = NoticesStatus.Init
            };

            string sysNo = hidSysNo.Value;
            if (!string.IsNullOrEmpty(sysNo))
            {
                notices.SysNo = int.Parse(sysNo);
                NoticesLogic.UpdateNotices(notices);
            }
            else
            {
                NoticesLogic.CreateNotices(notices);
            }
            Alert("保存成功!");
        }
Exemple #3
0
 /// <summary>
 /// 更新公告
 /// </summary>
 /// <param name="notices">公告信息</param>
 public static void UpdateNotices(Notices notices)
 {
     DataCommand cmd = DataCommandManager.GetDataCommand("UpdateNotices");
     cmd.SetParameterValue<Notices>(notices);
     cmd.ExecuteNonQuery();
 }
Exemple #4
0
 /// <summary>
 /// 更新公告
 /// </summary>
 /// <param name="notices">公告信息</param>
 public static void UpdateNotices(Notices notices)
 {
     NoticesDA.UpdateNotices(notices);
 }
Exemple #5
0
 /// <summary>
 /// 创建公告
 /// </summary>
 /// <param name="notices">公告信息</param>
 public static void CreateNotices(Notices notices)
 {
     NoticesDA.CreateNotices(notices);
 }