예제 #1
0
        public ActionResult AddBudgetExceed(FormCollection fc)
        {
            var abevm = new AddBudgetExceedViewModel();

            abevm.ExceedAmountProvision = Decimal.Parse(fc["ExceedAmountProvision"]);
            abevm.StartDate             = DateTime.Parse(fc["StartDate"]);
            abevm.EndDate     = DateTime.Parse(fc["EndDate"]);
            abevm.Remarks     = fc["Remarks"];
            abevm.BudgetId    = new BaseController(_repAnnualBudget).budgetList;
            abevm.CreatedDate = DateTime.Now;
            abevm.Status      = 1;

            _repAnnualBudget.AddBudgetExceed(abevm);

            return(RedirectToAction("Index"));
        }
예제 #2
0
        /// <summary>
        /// Adds Budget ExceedAmount
        /// </summary>
        /// <param name="abevm">AddBudgetExceedViewModel</param>
        public void AddBudgetExceed(AddBudgetExceedViewModel abevm)
        {
            string QueryString = String.Format(
                @"  INSERT INTO {0} 
                                    (BudgetId, ExceedAmountProvision, StartDate, EndDate, Remarks, CreatedDate, [Status])
                                    VALUES 
                                    ({1}, {2}, '{3}', '{4}', '{5}', '{6}', {7})",
                TableConstant.TBL_ANNUAL_BUDGET_EXCEED,
                abevm.BudgetId,
                abevm.ExceedAmountProvision,
                abevm.StartDate,
                abevm.EndDate,
                abevm.Remarks,
                abevm.CreatedDate,
                abevm.Status
                );

            ado.ExecNonQuery(QueryString);
        }