コード例 #1
0
        public IEnumerable <PurchaseOfCheese> GetList()
        {
            PurchaseOfCheese pm;

            spAdapter = new SQLSpAdapter("GetPurchaseOfCheese");
            spAdapter.ExecReader();
            foreach (var row in spAdapter.baggage)
            {
                pm = new PurchaseOfCheese();
                pm.RawMaterialsNavigation = new RawMaterials();
                pm.EmployeesNavigation    = new Employees();
                pm.IdPurchaseOfcheese     = Convert.ToInt32(row[0]);
                pm.RawMaterials           = Convert.ToInt16(row[1]);
                pm.Quantity  = Convert.ToDouble(row[2]);
                pm.Summ      = Convert.ToDecimal(row[3]);
                pm.Date      = Convert.ToDateTime(row[4]);
                pm.Employees = Convert.ToInt16(row[5]);
                pm.RawMaterialsNavigation.IdRawMaterials = Convert.ToInt16(row[6]);
                pm.RawMaterialsNavigation.Names          = row[7].ToString();
                pm.EmployeesNavigation.IdEmployees       = Convert.ToInt16(row[8]);
                pm.EmployeesNavigation.FullName          = row[9].ToString();
                purchaseOfCheeses.Add(pm);
            }
            return(purchaseOfCheeses);
        }
コード例 #2
0
        public IEnumerable <LoanRepayment> GetList()
        {
            LoanRepayment lp;

            sqladapter = new SQLSpAdapter("GetLoanRepayment");
            sqladapter.ExecReader();
            foreach (var row in sqladapter.baggage)
            {
                lp         = new LoanRepayment();
                lp.Creadit = new Credits();
                lp.MonthForPayNavigation = new Month();
                lp.IdLoanRepayment       = Convert.ToInt32(row[0]);
                lp.CreaditId             = Convert.ToInt16(row[1]);
                lp.MonthForPay           = Convert.ToByte(row[2]);
                lp.YearForPay            = Convert.ToInt16(row[3]);
                lp.DateOfPay             = Convert.ToDateTime(row[4]);
                lp.MonthlyPayment        = Convert.ToDecimal(row[5]);
                lp.ExpiredDays           = Convert.ToByte(row[6]);
                lp.Fine         = Convert.ToDecimal(row[7]);
                lp.TotalPayment = Convert.ToDecimal(row[8]);
                //lp.Creadit.IdCredits = Convert.ToInt16(row[9]);
                //lp.Creadit.Name = row[10].ToString();
                //lp.MonthForPayNavigation.IdMonth = Convert.ToByte(row[11]);
                //lp.MonthForPayNavigation.MonthName= row[12].ToString();
                loanRepayments.Add(lp);
            }
            return(loanRepayments);
        }
コード例 #3
0
        public IEnumerable <ProductSales> GetList()
        {
            ProductSales ps;

            spAdapter = new SQLSpAdapter("GetProductSales");
            spAdapter.ExecReader();
            foreach (var row in spAdapter.baggage)
            {
                ps = new ProductSales();
                ps.FinishedProductNavigation = new FinishedProducts();
                ps.EmployeesNavigation       = new Employees();
                ps.IdProductSales            = Convert.ToInt32(row[0]);
                ps.FinishedProduct           = Convert.ToByte(row[1]);
                ps.Quantity  = Convert.ToDouble(row[2]);
                ps.Summ      = Convert.ToDecimal(row[3]);
                ps.Date      = Convert.ToDateTime(row[4]);
                ps.Employees = Convert.ToInt16(row[5]);
                ps.FinishedProductNavigation.IdFinishedProducts = Convert.ToByte(row[6]);
                ps.FinishedProductNavigation.Names = row[7].ToString();
                ps.EmployeesNavigation.IdEmployees = Convert.ToInt16(row[8]);
                ps.EmployeesNavigation.FullName    = row[9].ToString();
                productSales.Add(ps);
            }
            return(productSales);
        }
コード例 #4
0
 public IEnumerable <UnitOfMeasure> GetList()
 {
     spAdapter = new SQLSpAdapter("GetUnitOfMeasure");
     spAdapter.ExecReader();
     foreach (var row in spAdapter.baggage)
     {
         units.Add(new UnitOfMeasure()
         {
             IdUnitOfmeasure = Convert.ToInt32(row[0]),
             Names           = row[1].ToString()
         });
     }
     return(units);
 }
コード例 #5
0
 public IEnumerable <Position> GetList()
 {
     sqladapter = new SQLSpAdapter("GetPosition");
     sqladapter.ExecReader();
     foreach (var row in sqladapter.baggage)
     {
         positions.Add(new Position()
         {
             IdPosition = Convert.ToByte(row[0]),
             Position1  = row[1].ToString()
         });
     }
     return(positions);
 }
コード例 #6
0
 public List <Years> getYears()
 {
     sqladapter = new SQLSpAdapter("GetYears");
     sqladapter.ExecReader();
     foreach (var row in sqladapter.baggage)
     {
         month.Add(new Years()
         {
             IdYears   = Convert.ToByte(row[0]),
             YearsName = Convert.ToInt32(row[1])
         });
     }
     return(month);
 }
コード例 #7
0
 public List <Month> getMonths()
 {
     sqladapter = new SQLSpAdapter("getMonth");
     sqladapter.ExecReader();
     foreach (var row in sqladapter.baggage)
     {
         month.Add(new Month()
         {
             IdMonth   = Convert.ToByte(row[0]),
             MonthName = row[1].ToString()
         });
     }
     return(month);
 }
コード例 #8
0
        public IEnumerable <Budget> GetList()
        {
            Budget budget;

            sqladapter = new SQLSpAdapter("GetBudget");
            sqladapter.ExecReader();
            foreach (var row in sqladapter.baggage)
            {
                budget               = new Budget();
                budget.IdBudget      = Convert.ToInt32(row[0]);
                budget.BudgetSum     = Convert.ToDouble(row[1]);
                budget.Prosent       = Convert.ToByte(row[2]);
                budget.ProsentSalary = Convert.ToByte(row[3]);
                budgets.Add(budget);
            }
            return(budgets);
        }
コード例 #9
0
 public IEnumerable <Credits> GetList()
 {
     sqladapter = new SQLSpAdapter("GetCredits");
     sqladapter.ExecReader();
     foreach (var row in sqladapter.baggage)
     {
         credits.Add(new Credits()
         {
             IdCredits      = Convert.ToInt16(row[0]),
             Name           = row[1].ToString(),
             CreaditAmount  = Convert.ToDecimal(row[2]),
             InterestRate   = Convert.ToByte(row[3]),
             CreditTerm     = Convert.ToInt16(row[4]),
             DateOfIssue    = Convert.ToDateTime(row[5]),
             MonthlyPayment = Convert.ToDecimal(row[6]),
             Fine           = Convert.ToDecimal(row[7])
         });
     }
     return(credits);
 }
コード例 #10
0
        public IEnumerable <Employees> GetList()
        {
            Employees st;

            sqladapter = new SQLSpAdapter("GetEmployee"); //Указываем имя ХП
            sqladapter.ExecReader();
            foreach (var row in sqladapter.baggage)
            {
                st = new Employees();
                st.PositionNavigation           = new Position();
                st.IdEmployees                  = Convert.ToInt16(row[0]);
                st.FullName                     = row[1].ToString();
                st.Position                     = Convert.ToByte(row[2]);
                st.Salary                       = Convert.ToDecimal(row[3]);
                st.Address                      = row[4].ToString();
                st.PhoneNumber                  = row[5].ToString();
                st.PositionNavigation.Position1 = row[6].ToString();
                employees.Add(st);
            }
            return(employees);
        }
コード例 #11
0
        public IEnumerable <FinishedProducts> GetList()
        {
            FinishedProducts fp;

            spAdapter = new SQLSpAdapter("GetFinishedProducts");
            spAdapter.ExecReader();
            foreach (var row in spAdapter.baggage)
            {
                fp = new FinishedProducts();
                fp.UnitOfMeasureNavigation = new UnitOfMeasure();
                fp.IdFinishedProducts      = Convert.ToInt32(row[0]);
                fp.Names         = row[1].ToString();
                fp.Quantity      = Convert.ToDouble(row[2]);
                fp.Summ          = Convert.ToDecimal(row[3]);
                fp.UnitOfMeasure = Convert.ToByte(row[4]);
                fp.UnitOfMeasureNavigation.IdUnitOfmeasure = Convert.ToByte(row[5]);
                fp.UnitOfMeasureNavigation.Names           = row[6].ToString();
                finishedProducts.Add(fp);
            }
            return(finishedProducts);
        }
コード例 #12
0
        public IEnumerable <RawMaterials> GetList()
        {
            RawMaterials rw;

            spAdapter = new SQLSpAdapter("GetRawMaterials");
            spAdapter.ExecReader();
            foreach (var row in spAdapter.baggage)
            {
                rw = new RawMaterials();
                rw.UnitOfMeasureNavigation = new UnitOfMeasure();
                rw.IdRawMaterials          = Convert.ToByte(row[0]);
                rw.Names         = row[1].ToString();
                rw.UnitOfMeasure = Convert.ToByte(row[2]);
                rw.Quantity      = Convert.ToDouble(row[3]);
                rw.Summ          = Convert.ToDecimal(row[4]);
                rw.UnitOfMeasureNavigation.IdUnitOfmeasure = Convert.ToByte(row[5]);
                rw.UnitOfMeasureNavigation.Names           = row[6].ToString();
                rawMaterials.Add(rw);
            }
            return(rawMaterials);
        }
コード例 #13
0
        public IEnumerable <Ingredients> GetList()
        {
            Ingredients ing;

            spAdapter = new SQLSpAdapter("GetIngredients");
            spAdapter.ExecReader();
            foreach (var row in spAdapter.baggage)
            {
                ing = new Ingredients();
                ing.ManufacturingNavigation = new FinishedProducts();
                ing.RawMaterialsNavigation  = new RawMaterials();
                ing.IdIngredients           = Convert.ToInt16(row[0]);
                ing.Manufacturing           = Convert.ToInt32(row[1]);
                ing.RawMaterials            = Convert.ToInt16(row[2]);
                ing.Quantity = Convert.ToDouble(row[3]);
                ing.ManufacturingNavigation.IdFinishedProducts = Convert.ToByte(row[4]);
                ing.ManufacturingNavigation.Names         = row[5].ToString();
                ing.RawMaterialsNavigation.IdRawMaterials = Convert.ToByte(row[6]);
                ing.RawMaterialsNavigation.Names          = row[7].ToString();
                ingredients.Add(ing);
            }
            return(ingredients);
        }
コード例 #14
0
        public IEnumerable <Manufacture> GetList()
        {
            Manufacture pr;

            spAdapter = new SQLSpAdapter("GetManufacture");
            spAdapter.ExecReader();
            foreach (var row in spAdapter.baggage)
            {
                pr = new Manufacture();
                pr.ProductionNavigation = new FinishedProducts();
                pr.EmployeesNavigation  = new Employees();
                pr.IdManufacture        = Convert.ToInt16(row[0]);
                pr.Production           = Convert.ToInt32(row[1]);
                pr.Quantity             = Convert.ToDouble(row[2]);
                pr.Date      = Convert.ToDateTime(row[3]);
                pr.Employees = Convert.ToInt16(row[4]);
                pr.ProductionNavigation.IdFinishedProducts = Convert.ToInt32(row[5]);
                pr.ProductionNavigation.Names      = row[6].ToString();
                pr.EmployeesNavigation.IdEmployees = Convert.ToInt16(row[7]);
                pr.EmployeesNavigation.FullName    = row[8].ToString();
                productions.Add(pr);
            }
            return(productions);
        }