Exemplo n.º 1
0
        public Int32 postTax()
        {
            try
            {
                Data.MstTax newTax = new Data.MstTax();
                newTax.Code      = "n/a";
                newTax.Tax       = "n/a";
                newTax.Rate      = 0;
                newTax.AccountId = AccountId();
                db.MstTaxes.InsertOnSubmit(newTax);
                db.SubmitChanges();

                return(newTax.Id);
            }
            catch (Exception e)
            {
                return(0);
            }
        }
Exemplo n.º 2
0
        public int Post(Models.MstTax tax)
        {
            try
            {

                Data.MstTax newTax = new Data.MstTax();

                //
                newTax.Code = tax.Code;
                newTax.Tax = tax.Tax;
                newTax.Rate = tax.Rate;
                newTax.AccountId = tax.AccountId;
                //

                db.MstTaxes.InsertOnSubmit(newTax);
                db.SubmitChanges();

                return newTax.Id;
            }
            catch
            {
                return 0;
            }
        }