示例#1
0
 public void Post([FromBody] PayrollArchiveHeaderModel payroll)
 {
     if (payroll.Id != 0)
     {
         _accounting.Update(payroll);
     }
     else
     {
         _accounting.Insert(payroll);
     }
 }
示例#2
0
        public void Update(PayrollArchiveHeaderModel payroll)
        {
            try
            {
                _sql.StartTransaction("AccountingConnStr");

                _sql.SaveDataInTransaction("dbo.spPayrollAccounting_Update", payroll);
            }
            catch (System.Exception)
            {
                _sql.RollBackTransaction();
                throw;
            }
        }
示例#3
0
        private void InsertAccountingHeader(PayrollArchiveHeaderModel accounting)
        {
            try
            {
                _sql.StartTransaction("AccountingConnStr");

                _sql.SaveDataInTransaction("dbo.spPayrollArchiveHeader_Insert", accounting);
            }
            catch (Exception)
            {
                _sql.RollBackTransaction();
                throw;
            }
            _sql.Dispose();
        }