Exemplo n.º 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Expenses EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToExpenses(Expens expens)
 {
     base.AddObject("Expenses", expens);
 }
Exemplo n.º 2
0
        public ActionResult Expenses(itmmExpenses a)
        {
            Expens b = new Expens();

            var labid = getLabId();

            b.LaboratoryId = labid;
            b.ExpensesTransaction = a.Transaction;
            b.ExpensesDetail = a.Detail;
            b.ExpensesCost = a.Cost;
            b.DateCreated = DateTime.Now;

            con.AddToExpenses(b);
            con.SaveChanges();

            return RedirectToAction("Expenses");
        }
Exemplo n.º 3
0
 /// <summary>
 /// Create a new Expens object.
 /// </summary>
 /// <param name="expensesId">Initial value of the ExpensesId property.</param>
 /// <param name="laboratoryId">Initial value of the LaboratoryId property.</param>
 /// <param name="expensesTransaction">Initial value of the ExpensesTransaction property.</param>
 /// <param name="expensesCost">Initial value of the ExpensesCost property.</param>
 /// <param name="dateCreated">Initial value of the DateCreated property.</param>
 /// <param name="expensesDetail">Initial value of the ExpensesDetail property.</param>
 public static Expens CreateExpens(global::System.Int32 expensesId, global::System.Int32 laboratoryId, global::System.String expensesTransaction, global::System.Decimal expensesCost, global::System.DateTime dateCreated, global::System.String expensesDetail)
 {
     Expens expens = new Expens();
     expens.ExpensesId = expensesId;
     expens.LaboratoryId = laboratoryId;
     expens.ExpensesTransaction = expensesTransaction;
     expens.ExpensesCost = expensesCost;
     expens.DateCreated = dateCreated;
     expens.ExpensesDetail = expensesDetail;
     return expens;
 }