/// <summary>
 /// 新增/删除/修改 T_ClassDicEntity (T_ClassDic)
 /// </summary>
 /// <param name="fam">T_ClassDicEntity实体类</param>
 /// <returns>-1:存储过程执行失败,-2:存在相同的主键,Insert:返回插入自动ID,Update:返回更新记录数,Delete:返回删除记录数</returns>
 public static Int32 T_ClassDicInsertUpdateDelete(T_ClassDicEntity fam)
 {
     return DataProvider.Instance().T_ClassDicInsertUpdateDelete(fam);
 }
Exemplo n.º 2
0
 /// <summary>
 /// 初始化数据
 /// </summary>
 /// <param name="ut"></param>
 private void OnStartData(T_ClassDicEntity ut)
 {
     ClassNO_Input.Text = ClassNO_Disp.Text = ut.ClassNO.ToString();
     ClassName_Input.Text = ClassName_Disp.Text = ut.ClassName.ToString();
 }
 /// <summary>
 /// 根据ID返回 T_ClassDicEntity实体类 单笔资料 (T_ClassDic)
 /// </summary>
 /// <param name="ID">ID ID</param>
 /// <returns>返回 T_ClassDicEntity实体类 ID为0则无记录</returns>
 public static T_ClassDicEntity T_ClassDicDisp(Int32 ID)
 {
     T_ClassDicEntity fam = new T_ClassDicEntity();
     QueryParam qp = new QueryParam();
     qp.PageIndex = 1;
     qp.PageSize = 1;
     qp.Where = string.Format(" Where {0}.{1} = {2}", "T_ClassDic", "ID", ID);
     int RecordCount = 0;
     List<T_ClassDicEntity> lst = T_ClassDicList(qp, out RecordCount);
     if (RecordCount > 0)
     {
         fam = lst[0];
     }
     return fam;
 }
Exemplo n.º 4
0
        /// <summary>
        /// 将记录集转为T_ClassDicEntity实体类 (T_ClassDic)
        /// </summary>
        /// <param name="dr">记录集</param>
        /// <param name="Fileds">字段名列表</param>
        /// <returns>T_ClassDicEntity</returns>
        protected T_ClassDicEntity PopulateT_ClassDicEntity(IDataReader dr, Dictionary<string, string> Fileds)
        {
            T_ClassDicEntity nc = new T_ClassDicEntity();

            if (Fileds.ContainsKey("ID") && !Convert.IsDBNull(dr["ID"])) nc.ID = Convert.ToInt32(dr["ID"]); // ID
            if (Fileds.ContainsKey("ClassNO") && !Convert.IsDBNull(dr["ClassNO"])) nc.ClassNO = Convert.ToString(dr["ClassNO"]).Trim(); // 类别名称
            if (Fileds.ContainsKey("ClassName") && !Convert.IsDBNull(dr["ClassName"])) nc.ClassName = Convert.ToString(dr["ClassName"]).Trim(); // 类别名称
            if (Fileds.ContainsKey("ParentClassNO") && !Convert.IsDBNull(dr["ParentClassNO"])) nc.ParentClassNO = Convert.ToString(dr["ParentClassNO"]).Trim(); // 父类
            if (Fileds.ContainsKey("State") && !Convert.IsDBNull(dr["State"])) nc.State = Convert.ToInt32(dr["State"]); // 状态(0为正常,9为删除)
            if (Fileds.ContainsKey("CreateTime") && !Convert.IsDBNull(dr["CreateTime"])) nc.CreateTime = Convert.ToDateTime(dr["CreateTime"]); // 创建日期
            if (Fileds.ContainsKey("UpdateTime") && !Convert.IsDBNull(dr["UpdateTime"])) nc.UpdateTime = Convert.ToDateTime(dr["UpdateTime"]); // 更新日期
            if (Fileds.ContainsKey("Sort") && !Convert.IsDBNull(dr["Sort"])) nc.Sort = Convert.ToInt32(dr["Sort"]); // Sort
            return nc;
        }
Exemplo n.º 5
0
 /// <summary>
 /// 新增/删除/修改 T_ClassDicEntity (T_ClassDic)
 /// </summary>
 /// <param name="fam">T_ClassDic实体类</param>
 /// <returns>-1:存储过程执行失败,-2:存在相同的主键,Insert:返回插入自动ID,Update:返回更新记录数,Delete:返回删除记录数</returns>
 public abstract Int32 T_ClassDicInsertUpdateDelete(T_ClassDicEntity fam);
Exemplo n.º 6
0
 /// <summary>
 /// 初始化数据
 /// </summary>
 /// <param name="ut"></param>
 private void OnStartData(T_ClassDicEntity ut)
 {
 ClassNO_Input.Text = ClassNO_Disp.Text = ut.ClassNO.ToString();
         ClassName_Input.Text = ClassName_Disp.Text = ut.ClassName.ToString();
         ParentClassNO_Input.Text = ParentClassNO_Disp.Text = ut.ParentClassNO.ToString();
         State_Input.Text = State_Disp.Text = ut.State.ToString();
         CreateTime_Input.Text = CreateTime_Disp.Text = ut.CreateTime.ToString();
         UpdateTime_Input.Text = UpdateTime_Disp.Text = ut.UpdateTime.ToString();
         Sort_Input.Text = Sort_Disp.Text = ut.Sort.ToString();
         
 }
Exemplo n.º 7
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))
                {
                    T_ClassDicEntity et = new T_ClassDicEntity();
                    et.DataTable_Action_ = DataTable_Action.Delete;
                    et.ID = IDX;
                    BusinessFacadeShanlitech_Location.T_ClassDicInsertUpdateDelete(et);
                }
            }

            EventMessage.MessageBox(1, "批量删除成功", string.Format("批量删除({0})成功!", Checkbox_Value), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
        }