示例#1
0
        public SystemMessage SavePaymentProduct(BaseListParam listParam, PaymentProduct obj)
        {
            SystemMessage systemMessage = new SystemMessage();

            try
            {
                var param = new DynamicParameters();
                param.Add("@AutoID", obj.AutoID);
                param.Add("@CustomerID", obj.CustomerID);
                param.Add("@StaffID", obj.StaffID);
                param.Add("@Status", obj.Status);
                param.Add("@PaymentDate", obj.PaymentDate);
                param.Add("@Amount", obj.Amount);
                param.Add("@ProductID", obj.ProductID);
                param.Add("@CreatedBy", obj.CreatedBy);
                param.Add("@OrganizationUnitID", obj.OrganizationUnitID);
                UnitOfWork.ProcedureExecute("PaymentProduct_Save", param);
                systemMessage.IsSuccess = true;
                return(systemMessage);
            }
            catch (Exception e)
            {
                systemMessage.IsSuccess = false;
                systemMessage.Message   = e.ToString();
                return(systemMessage);
            }
        }
示例#2
0
        public ActionResult SavePaymentProduct(PaymentProduct obj)
        {
            var baseListParam = new BaseListParam()
            {
                UserType     = Global.CurrentUser.RoleId,
                UserId       = Global.CurrentUser.LoginUserId,
                DeptId       = Global.CurrentUser.OrganizationUnitID,
                LanguageCode = Global.CurrentUser.CurrentLanguageID.ToString()
            };
            var db     = new PaymentProductDAL();
            var result = db.SavePaymentProduct(baseListParam, obj);

            //if (result.IsSuccess == true && obj.WPID == 0)
            //{
            //    result.Message = AppRes.MSG_INSERT_SUCCESSFUL;
            //}
            //else if (result.IsSuccess == true && obj.WPID != 0)
            //{
            //    result.Message = AppRes.MS_Update_success;
            //}
            return(Content(JsonConvert.SerializeObject(new
            {
                result
            })));
        }