예제 #1
0
        // public ContractSupply contractSupply;

        public ReportPredictTable(ReportPredict reportPredict, Product product, Storehouse storehouse)
        {
            this.product       = product;
            this.storehouse    = storehouse;
            this.reportPredict = reportPredict;
            //this.contractSupply = contractSupply;
        }
예제 #2
0
 public ReportBalanceTable(ReportBalance reportBalance, Product product, StoreCell storeCell, Storehouse storehouse)
 {
     this.product       = product;
     this.storehouse    = storehouse;
     this.storeCell     = storeCell;
     this.reportBalance = reportBalance;
 }
예제 #3
0
 public ContractMoveTable(ContractMove contractMove, StoreCell storeCellFrom, StoreCell storeCellTo, Storehouse storehouseFrom, Storehouse storehouseTo)
 {
     this.contractMove   = contractMove;
     this.storeCellFrom  = storeCellFrom;
     this.storeCellTo    = storeCellTo;
     this.storehouseFrom = storehouseFrom;
     this.storehouseTo   = storehouseTo;
 }
예제 #4
0
 public bool queryAddStorehouse(Storehouse c)
 {
     if (LoginInfo.Position == 1 || LoginInfo.Position == 2 || LoginInfo.Position == 3)
     {
         using (DataBaseContext db = new DataBaseContext())
         {
             try
             {
                 db.Storehouses.Add(c);
                 db.SaveChanges();
             }
             catch (Exception e)
             {
                 return(false);
             }
             return(true);
         }
     }
     return(false);
 }
예제 #5
0
        public bool queryDeleteStorehouse(int Id)
        {
            if (LoginInfo.Position == 1 || LoginInfo.Position == 2 || LoginInfo.Position == 3)
            {
                using (DataBaseContext db = new DataBaseContext())
                {
                    try
                    {
                        Storehouse p = db.Storehouses.Find(Id);
                        db.Storehouses.Remove(p);

                        db.SaveChanges();
                    }
                    catch (Exception e)
                    {
                        return(false);
                    }
                    return(true);
                }
            }
            return(false);
        }
예제 #6
0
        public bool queryUpdateStorehouse(Storehouse c)
        {
            if (LoginInfo.Position == 1 || LoginInfo.Position == 2 || LoginInfo.Position == 3)
            {
                using (DataBaseContext db = new DataBaseContext())
                {
                    try
                    {
                        Storehouse p = db.Storehouses.Find(c.Id);

                        p.Name    = c.Name;
                        p.Address = c.Address;

                        db.SaveChanges();
                    }
                    catch (Exception e)
                    {
                        return(false);
                    }
                    return(true);
                }
            }
            return(false);
        }
예제 #7
0
 public StoreCellTable(StoreCell storeCell, Storehouse storehouse)
 {
     this.storeCell  = storeCell;
     this.storehouse = storehouse;
 }
예제 #8
0
 public ContractShipmentTable(ContractShipment contractShipment, StoreCell storeCellFrom, Storehouse storehouseFrom)
 {
     this.contractShipment = contractShipment;
     this.storeCellFrom    = storeCellFrom;
     this.storehouseFrom   = storehouseFrom;
 }