예제 #1
0
 /// <summary>
 /// 初始化数据
 /// </summary>
 /// <param name="ut"></param>
 private void OnStartData(T_ProjectDicEntity ut)
 {
 ProjectNO_Input.Text = ProjectNO_Disp.Text = ut.ProjectNO.ToString();
         ProjectName_Input.Text = ProjectName_Disp.Text = ut.ProjectName.ToString();
         SubjectNO_Input.Text = SubjectNO_Disp.Text = ut.SubjectNO.ToString();
         ClassNO_Input.Text = ClassNO_Disp.Text = ut.ClassNO.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();
         
 }
예제 #2
0
 /// <summary>
 /// 初始化数据
 /// </summary>
 /// <param name="ut"></param>
 private void OnStartData(T_ProjectDicEntity ut)
 {
     ProjectNO_Input.Text = ProjectNO_Disp.Text = ut.ProjectNO.ToString();
     ProjectName_Input.Text = ProjectName_Disp.Text = ut.ProjectName.ToString();
 }
예제 #3
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_ProjectDicEntity et = new T_ProjectDicEntity();
                    et.DataTable_Action_ = DataTable_Action.Delete;
                    et.ID = IDX;
                    BusinessFacadeShanlitech_Location.T_ProjectDicInsertUpdateDelete(et);
                }
            }

            EventMessage.MessageBox(1, "批量删除成功", string.Format("批量删除({0})成功!", Checkbox_Value), Icon_Type.OK, Common.GetHomeBaseUrl("default.aspx"));
        }
 /// <summary>
 /// 根据ID返回 T_ProjectDicEntity实体类 单笔资料 (T_ProjectDic)
 /// </summary>
 /// <param name="ID">ID ID</param>
 /// <returns>返回 T_ProjectDicEntity实体类 ID为0则无记录</returns>
 public static T_ProjectDicEntity T_ProjectDicDisp(Int32 ID)
 {
     T_ProjectDicEntity fam = new T_ProjectDicEntity();
     QueryParam qp = new QueryParam();
     qp.PageIndex = 1;
     qp.PageSize = 1;
     qp.Where = string.Format(" Where {0}.{1} = {2}", "T_ProjectDic", "ID", ID);
     int RecordCount = 0;
     List<T_ProjectDicEntity> lst = T_ProjectDicList(qp, out RecordCount);
     if (RecordCount > 0)
     {
         fam = lst[0];
     }
     return fam;
 }
 /// <summary>
 /// 新增/删除/修改 T_ProjectDicEntity (T_ProjectDic)
 /// </summary>
 /// <param name="fam">T_ProjectDicEntity实体类</param>
 /// <returns>-1:存储过程执行失败,-2:存在相同的主键,Insert:返回插入自动ID,Update:返回更新记录数,Delete:返回删除记录数</returns>
 public static Int32 T_ProjectDicInsertUpdateDelete(T_ProjectDicEntity fam)
 {
     return DataProvider.Instance().T_ProjectDicInsertUpdateDelete(fam);
 }
예제 #6
0
        /// <summary>
        /// 将记录集转为T_ProjectDicEntity实体类 (T_ProjectDic)
        /// </summary>
        /// <param name="dr">记录集</param>
        /// <param name="Fileds">字段名列表</param>
        /// <returns>T_ProjectDicEntity</returns>
        protected T_ProjectDicEntity PopulateT_ProjectDicEntity(IDataReader dr, Dictionary<string, string> Fileds)
        {
            T_ProjectDicEntity nc = new T_ProjectDicEntity();

            if (Fileds.ContainsKey("ID") && !Convert.IsDBNull(dr["ID"])) nc.ID = Convert.ToInt32(dr["ID"]); // ID
            if (Fileds.ContainsKey("ProjectNO") && !Convert.IsDBNull(dr["ProjectNO"])) nc.ProjectNO = Convert.ToString(dr["ProjectNO"]).Trim(); // 项目编号
            if (Fileds.ContainsKey("ProjectName") && !Convert.IsDBNull(dr["ProjectName"])) nc.ProjectName = Convert.ToString(dr["ProjectName"]).Trim(); // ProjectName
            if (Fileds.ContainsKey("SubjectNO") && !Convert.IsDBNull(dr["SubjectNO"])) nc.SubjectNO = Convert.ToString(dr["SubjectNO"]).Trim(); // 所属科目
            if (Fileds.ContainsKey("ClassNO") && !Convert.IsDBNull(dr["ClassNO"])) nc.ClassNO = Convert.ToString(dr["ClassNO"]).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"]); // CreateTime
            if (Fileds.ContainsKey("UpdateTime") && !Convert.IsDBNull(dr["UpdateTime"])) nc.UpdateTime = Convert.ToDateTime(dr["UpdateTime"]); // UpdateTime
            return nc;
        }
예제 #7
0
 /// <summary>
 /// 新增/删除/修改 T_ProjectDicEntity (T_ProjectDic)
 /// </summary>
 /// <param name="fam">T_ProjectDic实体类</param>
 /// <returns>-1:存储过程执行失败,-2:存在相同的主键,Insert:返回插入自动ID,Update:返回更新记录数,Delete:返回删除记录数</returns>
 public abstract Int32 T_ProjectDicInsertUpdateDelete(T_ProjectDicEntity fam);