Esempio n. 1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <DigiPower.Onlinecol.Standard.Model.T_DefineReult_MDL> DataTableToList(DataTable dt)
        {
            List <DigiPower.Onlinecol.Standard.Model.T_DefineReult_MDL> modelList = new List <DigiPower.Onlinecol.Standard.Model.T_DefineReult_MDL>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                DigiPower.Onlinecol.Standard.Model.T_DefineReult_MDL model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new DigiPower.Onlinecol.Standard.Model.T_DefineReult_MDL();
                    if (dt.Rows[n]["DefineResultID"].ToString() != "")
                    {
                        model.DefineResultID = int.Parse(dt.Rows[n]["DefineResultID"].ToString());
                    }
                    if (dt.Rows[n]["CanDefineTypeID"].ToString() != "")
                    {
                        model.CanDefineTypeID = int.Parse(dt.Rows[n]["CanDefineTypeID"].ToString());
                    }
                    if (dt.Rows[n]["OrderIndex"].ToString() != "")
                    {
                        model.OrderIndex = int.Parse(dt.Rows[n]["OrderIndex"].ToString());
                    }
                    if (dt.Rows[n]["SplitID"].ToString() != "")
                    {
                        model.SplitID = int.Parse(dt.Rows[n]["SplitID"].ToString());
                    }
                    model.FileType_DEL = dt.Rows[n]["FileType_DEL"].ToString();
                    if (dt.Rows[n]["CutLength"].ToString() != "")
                    {
                        model.CutLength = int.Parse(dt.Rows[n]["CutLength"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Esempio n. 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(DigiPower.Onlinecol.Standard.Model.T_DefineReult_MDL model)
 {
     dal.Update(model);
 }
Esempio n. 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(DigiPower.Onlinecol.Standard.Model.T_DefineReult_MDL model)
 {
     return(dal.Add(model));
 }