示例#1
0
        ///<Summary>
        ///Update
        ///This method updates one SalesReports record in the store
        ///</Summary>
        ///<returns>
        ///void
        ///</returns>
        ///<parameters>
        ///BOSalesReports
        ///</parameters>
        public virtual void Update()
        {
            Doing(this);
            IDAOSalesReports daoSalesReports = _iSalesReportsRepository.New();

            RegisterDataObject(_iSalesReportsRepository, _iSalesReportsRepository.BaseData(daoSalesReports));
            BeginTransaction(_iSalesReportsRepository, "updateBOSalesReports");
            try
            {
                daoSalesReports.GroupBy         = _groupBy;
                daoSalesReports.Display         = _display;
                daoSalesReports.Title           = _title;
                daoSalesReports.FilterRowSource = _filterRowSource;
                daoSalesReports.Default         = _default;
                daoSalesReports.CtrVersion      = _ctrVersion;
                _iSalesReportsRepository.Update(daoSalesReports);
                CommitTransaction(_iSalesReportsRepository);
                Done(this);

                _groupBy         = daoSalesReports.GroupBy;
                _display         = daoSalesReports.Display;
                _title           = daoSalesReports.Title;
                _filterRowSource = daoSalesReports.FilterRowSource;
                _default         = daoSalesReports.Default;
                _ctrVersion      = daoSalesReports.CtrVersion;
                _isDirty         = false;
            }
            catch (Exception ex)
            {
                Failed(this, ex);
                RollbackTransaction(_iSalesReportsRepository, "updateBOSalesReports");
                Handle(this, ex);
            }
        }
示例#2
0
        public IHttpActionResult Update(SalesForm salesReportsDS)
        {
            var isupdate = _salesReportsRepository.Update(salesReportsDS);

            if (isupdate == true)
            {
                return(Ok(isupdate));
            }
            return(BadRequest());
        }