/// <summary>
 /// 新增/删除/修改 app_NotifyEntity ()
 /// </summary>
 /// <param name="fam">app_NotifyEntity实体类</param>
 /// <returns>-1:存储过程执行失败,-2:存在相同的主键,Insert:返回插入自动ID,Update:返回更新记录数,Delete:返回删除记录数</returns>
 public static Int32 app_NotifyInsertUpdateDelete(app_NotifyEntity fam)
 {
     return DataProvider.Instance().app_NotifyInsertUpdateDelete(fam);
 }
 /// <summary>
 /// 根据ID返回 app_NotifyEntity实体类 单笔资料 ()
 /// </summary>
 /// <param name="ID">ID </param>
 /// <returns>返回 app_NotifyEntity实体类 ID为0则无记录</returns>
 public static app_NotifyEntity app_NotifyDisp(Int32 ID)
 {
     app_NotifyEntity fam = new app_NotifyEntity();
     QueryParam qp = new QueryParam();
     qp.PageIndex = 1;
     qp.PageSize = 1;
     qp.Where = string.Format(" Where {0}.{1} = {2}","app_Notify","ID",ID);
     int RecordCount = 0;
     List<app_NotifyEntity> lst = app_NotifyList(qp, out RecordCount);
     if (RecordCount > 0)
     {
         fam = lst[0];
     }
     return fam;
 }
Exemple #3
0
        /// <summary>
        /// 将记录集转为app_NotifyEntity实体类 ()
        /// </summary>
        /// <param name="dr">记录集</param>
        /// <param name="Fileds">字段名列表</param>
        /// <returns>app_NotifyEntity</returns>
        protected app_NotifyEntity Populateapp_NotifyEntity(IDataReader dr,Dictionary<string,string> Fileds)
        {
            app_NotifyEntity nc = new app_NotifyEntity();

            if (Fileds.ContainsKey("ID") && !Convert.IsDBNull(dr["ID"])) nc.ID = Convert.ToInt32(dr["ID"]); //
            if (Fileds.ContainsKey("Title") && !Convert.IsDBNull(dr["Title"])) nc.Title = Convert.ToString(dr["Title"]); // 标题
            if (Fileds.ContainsKey("Notifier") && !Convert.IsDBNull(dr["Notifier"])) nc.Notifier = Convert.ToString(dr["Notifier"]); // 通知部门
            if (Fileds.ContainsKey("AddTime") && !Convert.IsDBNull(dr["AddTime"])) nc.AddTime = Convert.ToDateTime(dr["AddTime"]); // 通知时间
            if (Fileds.ContainsKey("Content") && !Convert.IsDBNull(dr["Content"])) nc.Content = Convert.ToString(dr["Content"]); // 通知内容
            return nc;
        }
Exemple #4
0
 /// <summary>
 /// 新增/删除/修改 app_NotifyEntity ()
 /// </summary>
 /// <param name="fam">app_Notify实体类</param>
 /// <returns>-1:存储过程执行失败,-2:存在相同的主键,Insert:返回插入自动ID,Update:返回更新记录数,Delete:返回删除记录数</returns>
 public abstract Int32 app_NotifyInsertUpdateDelete(app_NotifyEntity fam);
Exemple #5
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            string Checkbox_Value = (string)Common.sink("Checkbox", MethodType.Post, 2000, 1, DataType.Str);
            string[] Checkbox_Value_Array = Checkbox_Value.Split(',');
            Int32 IDX = 0;
            for (int i = 0; i < Checkbox_Value_Array.Length; i++)
            {
                if (Int32.TryParse(Checkbox_Value_Array[i], out IDX))
                {
                    app_NotifyEntity et = new app_NotifyEntity();
                    et.DataTable_Action_ = DataTable_Action.Delete;
                    et.ID = IDX;
                    BusinessFacadeFrameWork.app_NotifyInsertUpdateDelete(et);
                }
            }

            EventMessage.MessageBox(1, "批量删除成功", string.Format("批量删除({0})成功!", Checkbox_Value), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
        }
Exemple #6
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        /// <param name="ut"></param>
        private void OnStartData(app_NotifyEntity ut)
        {
            Title_Input.Text = Title_Disp.Text = ut.Title.ToString();
                Notifier_Input.Text = Notifier_Disp.Text = ut.Notifier.ToString();

                if (ut.AddTime == null || ut.AddTime.ToString().Length == 0)
                {
                    ut.AddTime = DateTime.Now;
                }

                AddTime_Input.Text = AddTime_Disp.Text = Common.ConvertDate(ut.AddTime);
                Content_Input.Text = Content_Disp.Text = ut.Content.ToString();
        }