Ejemplo 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);
        }
Ejemplo n.º 2
0
 public bool Update(Chain.Model.MemberExplanation model)
 {
     return(this.dal.Update(model));
 }
Ejemplo n.º 3
0
 public int Add(Chain.Model.MemberExplanation model)
 {
     return(this.dal.Add(model));
 }