Exemplo n.º 1
0
        public BaseOutput AddNetConsumeModel(NetConsumeModel item)
        {
            CRUDOperation cRUDOperation = new CRUDOperation();
            BaseOutput    baseOutput;


            try
            {
                tbl_NetConsumeModel netConsumeModel = new tbl_NetConsumeModel()
                {
                    UserID    = item.UserID,
                    BeginDate = item.BeginDate,
                    EndDate   = item.EndDate,
                };

                List <tbl_NetConsumeDetail> tblNetConsumeDetails = new List <tbl_NetConsumeDetail>();

                tblNetConsumeDetails = item.NetConsumeDetails;
                tbl_NetConsumeModel _netConsumeModel = cRUDOperation.AddNetConsumeModel(netConsumeModel, tblNetConsumeDetails);
                return(baseOutput = new BaseOutput(true, BOResultTypes.Success.GetHashCode(), BOBaseOutputResponse.SuccessResponse, ""));
            }
            catch (Exception ex)
            {
                return(baseOutput = new BaseOutput(false, BOResultTypes.Danger.GetHashCode(), BOBaseOutputResponse.DangerResponse, ex.Message));
            }
        }