Пример #1
0
        public int Delete(string[] HeadIds)
        {
            //防止注入式漏洞
            string headIds = string.Join(",", HeadIds);

            Book.DAL.T_Stock_In dal = new DAL.T_Stock_In();
            return(dal.Delete(headIds));
        }
Пример #2
0
        public bool AddSave(Book.Model.T_Stock_In inStock)
        {
            decimal totalMoney = 0;

            foreach (Book.Model.T_Stock_InItems item in inStock.Items)
            {
                totalMoney += item.Amount * item.Discount * item.Price;
            }
            inStock.Head.TotalMoney = totalMoney;
            DAL.T_Stock_In dal = new DAL.T_Stock_In();
            return(dal.AddSave(inStock));
        }
Пример #3
0
 public Book.Model.Home GetCount()
 {
     Book.Model.Home      home     = new Model.Home();
     Book.DAL.T_Base_Book book_dal = new DAL.T_Base_Book();
     home.BookCount = book_dal.GetCount();
     Book.DAL.T_Base_Provider provider_dal = new DAL.T_Base_Provider();
     home.ProviderCount = provider_dal.GetCount();
     Book.DAL.T_Base_Customer customer_dal = new DAL.T_Base_Customer();
     home.CustomerCount = customer_dal.GetCount();
     Book.DAL.T_Stock_In in_dal = new DAL.T_Stock_In();
     home.InHeadCount = in_dal.GetCount();
     Book.DAL.T_Stock_Out out_dal = new DAL.T_Stock_Out();
     home.OutHeadCount = in_dal.GetCount();
     return(home);
 }
Пример #4
0
 public int GetCount()
 {
     Book.DAL.T_Stock_In dal = new DAL.T_Stock_In();
     return(dal.GetCount());
 }
Пример #5
0
 public List <Book.Model.T_Stock_In> GetList(int pageNumber, int pageSize)
 {
     Book.DAL.T_Stock_In dal = new DAL.T_Stock_In();
     return(dal.GetList(pageNumber, pageSize));
 }
Пример #6
0
 public List <Book.Model.T_Stock_In> GetAll()
 {
     Book.DAL.T_Stock_In dal = new DAL.T_Stock_In();
     return(dal.GetAll());
 }