Пример #1
0
        public ActionResult Income(itmmIncome a)
        {
            itmm.Models.Income b = new itmm.Models.Income();
            b.Transactionn = a.Transaction;
            b.cost         = a.Cost;
            b.LaboratoryId = getLabId();
            b.DateCreated  = DateTime.Now;


            StudentInfo c = new StudentInfo();

            c.FirstName     = a.FirstName;
            c.FamiliyName   = a.FamilyName;
            c.StudentId     = a.IdNumber.ToString();
            c.CourseAndYear = a.Course;

            c.IncomeId      = b.IncomeId;
            b.StudentInfoId = c.StudentInfoId;

            con.AddToIncomes(b);
            con.AddToStudentInfoes(c);


            con.SaveChanges();
            return(RedirectToAction("Income"));
        }
Пример #2
0
        public ActionResult Income(itmmIncome a)
        {
            itmm.Models.Income b = new itmm.Models.Income();
            b.Transactionn = a.Transaction;
            b.cost = a.Cost;
            b.LaboratoryId = getLabId();
            b.DateCreated = DateTime.Now;

            StudentInfo c = new StudentInfo();
            c.FirstName = a.FirstName;
            c.FamiliyName = a.FamilyName;
            c.StudentId = a.IdNumber.ToString();
            c.CourseAndYear = a.Course;

            c.IncomeId = b.IncomeId;
            b.StudentInfoId = c.StudentInfoId;

            con.AddToIncomes(b);
            con.AddToStudentInfoes(c);

            con.SaveChanges();
            return RedirectToAction("Income");
        }
Пример #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Incomes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToIncomes(Income income)
 {
     base.AddObject("Incomes", income);
 }
Пример #4
0
 /// <summary>
 /// Create a new Income object.
 /// </summary>
 /// <param name="incomeId">Initial value of the IncomeId property.</param>
 /// <param name="laboratoryId">Initial value of the LaboratoryId property.</param>
 /// <param name="studentInfoId">Initial value of the StudentInfoId property.</param>
 /// <param name="transactionn">Initial value of the Transactionn property.</param>
 /// <param name="cost">Initial value of the cost property.</param>
 /// <param name="dateCreated">Initial value of the DateCreated property.</param>
 public static Income CreateIncome(global::System.Int32 incomeId, global::System.Int32 laboratoryId, global::System.Int32 studentInfoId, global::System.String transactionn, global::System.Decimal cost, global::System.DateTime dateCreated)
 {
     Income income = new Income();
     income.IncomeId = incomeId;
     income.LaboratoryId = laboratoryId;
     income.StudentInfoId = studentInfoId;
     income.Transactionn = transactionn;
     income.cost = cost;
     income.DateCreated = dateCreated;
     return income;
 }