Esempio n. 1
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(JMP.MDL.jmp_bill model)
 {
     return(dal.Update(model));
 }
Esempio n. 2
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <JMP.MDL.jmp_bill> DataTableToList(DataTable dt)
        {
            List <JMP.MDL.jmp_bill> modelList = new List <JMP.MDL.jmp_bill>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                JMP.MDL.jmp_bill model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new JMP.MDL.jmp_bill();
                    if (dt.Rows[n]["b_id"].ToString() != "")
                    {
                        model.b_id = int.Parse(dt.Rows[n]["b_id"].ToString());
                    }
                    if (dt.Rows[n]["SdWxOfficalAccountPay"].ToString() != "")
                    {
                        model.SdWxOfficalAccountPay = decimal.Parse(dt.Rows[n]["SdWxOfficalAccountPay"].ToString());
                    }
                    if (dt.Rows[n]["SdWxAppPay"].ToString() != "")
                    {
                        model.SdWxAppPay = decimal.Parse(dt.Rows[n]["SdWxAppPay"].ToString());
                    }
                    if (dt.Rows[n]["SdWxQrCodePay"].ToString() != "")
                    {
                        model.SdWxQrCodePay = decimal.Parse(dt.Rows[n]["SdWxQrCodePay"].ToString());
                    }
                    if (dt.Rows[n]["SdAliQrCodePay"].ToString() != "")
                    {
                        model.SdAliQrCodePay = decimal.Parse(dt.Rows[n]["SdAliQrCodePay"].ToString());
                    }
                    if (dt.Rows[n]["BlTotalAmount"].ToString() != "")
                    {
                        model.BlTotalAmount = decimal.Parse(dt.Rows[n]["BlTotalAmount"].ToString());
                    }
                    if (dt.Rows[n]["BlAliPay"].ToString() != "")
                    {
                        model.BlAliPay = decimal.Parse(dt.Rows[n]["BlAliPay"].ToString());
                    }
                    if (dt.Rows[n]["BlWxPay"].ToString() != "")
                    {
                        model.BlWxPay = decimal.Parse(dt.Rows[n]["BlWxPay"].ToString());
                    }
                    if (dt.Rows[n]["BlUnionPay"].ToString() != "")
                    {
                        model.BlUnionPay = decimal.Parse(dt.Rows[n]["BlUnionPay"].ToString());
                    }
                    if (dt.Rows[n]["BlWxOfficalAccountPay"].ToString() != "")
                    {
                        model.BlWxOfficalAccountPay = decimal.Parse(dt.Rows[n]["BlWxOfficalAccountPay"].ToString());
                    }
                    if (dt.Rows[n]["BlWxAppPay"].ToString() != "")
                    {
                        model.BlWxAppPay = decimal.Parse(dt.Rows[n]["BlWxAppPay"].ToString());
                    }
                    if (dt.Rows[n]["OrderDate"].ToString() != "")
                    {
                        model.OrderDate = DateTime.Parse(dt.Rows[n]["OrderDate"].ToString());
                    }
                    if (dt.Rows[n]["BlWxQrCodePay"].ToString() != "")
                    {
                        model.BlWxQrCodePay = decimal.Parse(dt.Rows[n]["BlWxQrCodePay"].ToString());
                    }
                    if (dt.Rows[n]["BlAliQrCodePay"].ToString() != "")
                    {
                        model.BlAliQrCodePay = decimal.Parse(dt.Rows[n]["BlAliQrCodePay"].ToString());
                    }
                    if (dt.Rows[n]["UserId"].ToString() != "")
                    {
                        model.UserId = int.Parse(dt.Rows[n]["UserId"].ToString());
                    }
                    model.UserName = dt.Rows[n]["UserName"].ToString();
                    if (dt.Rows[n]["CreatedOn"].ToString() != "")
                    {
                        model.CreatedOn = DateTime.Parse(dt.Rows[n]["CreatedOn"].ToString());
                    }
                    if (dt.Rows[n]["SdTotalAmount"].ToString() != "")
                    {
                        model.SdTotalAmount = decimal.Parse(dt.Rows[n]["SdTotalAmount"].ToString());
                    }
                    if (dt.Rows[n]["SdAliPay"].ToString() != "")
                    {
                        model.SdAliPay = decimal.Parse(dt.Rows[n]["SdAliPay"].ToString());
                    }
                    if (dt.Rows[n]["SdWxPay"].ToString() != "")
                    {
                        model.SdWxPay = decimal.Parse(dt.Rows[n]["SdWxPay"].ToString());
                    }
                    if (dt.Rows[n]["SdUnionPay"].ToString() != "")
                    {
                        model.SdUnionPay = decimal.Parse(dt.Rows[n]["SdUnionPay"].ToString());
                    }


                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Esempio n. 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(JMP.MDL.jmp_bill model)
 {
     return(dal.Add(model));
 }