Ejemplo n.º 1
0
        public int CreateMiscBillingCharge(MiscBillingChargeCreateArgs args)
        {
            using (var cmd = NewCommand("sselData.dbo.MiscBillingCharge_Insert"))
            {
                cmd.Parameters.AddWithValue("AccountID", args.AccountID, SqlDbType.Int);
                cmd.Parameters.AddWithValue("ActDate", args.ActDate, SqlDbType.DateTime);
                cmd.Parameters.AddWithValue("ClientID", args.ClientID, SqlDbType.Int);
                cmd.Parameters.AddWithValue("Description", args.Description, SqlDbType.NVarChar, 100);
                cmd.Parameters.AddWithValue("Period", args.Period, SqlDbType.DateTime);
                cmd.Parameters.AddWithValue("Quantity", args.Quantity, SqlDbType.Float);
                cmd.Parameters.AddWithValue("SUBType", args.SUBType, SqlDbType.NVarChar, 10);
                cmd.Parameters.AddWithValue("UnitCost", args.UnitCost, SqlDbType.Decimal);

                cmd.Connection.Open();
                var obj = cmd.ExecuteScalar();
                cmd.Connection.Close();
                var result = Convert.ToInt32(obj ?? 0);

                return(result);
            }
        }
Ejemplo n.º 2
0
 public int CreateMiscBillingCharge(MiscBillingChargeCreateArgs args)
 {
     return(Post <int>("webapi/billing/misc/create", args));
 }
 public int CreateMiscBilling([FromBody] MiscBillingChargeCreateArgs args)
 {
     // Always recalculate subsidy after creating a new MiscBillingCharge.
     using (DA.StartUnitOfWork())
         return(ServiceProvider.Current.Billing.Misc.CreateMiscBillingCharge(args));
 }