Esempio n. 1
0
        public List <Chain.Model.MemberExplanation> DataTableToList(DataTable dt)
        {
            List <Chain.Model.MemberExplanation> modelList = new List <Chain.Model.MemberExplanation>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                for (int i = 0; i < rowsCount; i++)
                {
                    Chain.Model.MemberExplanation model = new Chain.Model.MemberExplanation();
                    if (dt.Rows[i]["MemberExplanationID"] != null && dt.Rows[i]["MemberExplanationID"].ToString() != "")
                    {
                        model.MemberExplanationID = int.Parse(dt.Rows[i]["MemberExplanationID"].ToString());
                    }
                    if (dt.Rows[i]["MemberExplanationDesc"] != null && dt.Rows[i]["MemberExplanationDesc"].ToString() != "")
                    {
                        model.MemberExplanationDesc = dt.Rows[i]["MemberExplanationDesc"].ToString();
                    }
                    if (dt.Rows[i]["MemberExplanationTime"] != null && dt.Rows[i]["MemberExplanationTime"].ToString() != "")
                    {
                        model.MemberExplanationTime = DateTime.Parse(dt.Rows[i]["MemberExplanationTime"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Esempio n. 2
0
 public bool Update(Chain.Model.MemberExplanation model)
 {
     return(this.dal.Update(model));
 }
Esempio n. 3
0
 public int Add(Chain.Model.MemberExplanation model)
 {
     return(this.dal.Add(model));
 }