コード例 #1
0
        public void Extract(Guid srcPackID, string productCode)
        {
            Pack pack = PackBLL.Get4Extract(srcPackID);

            PackBLL.Add(pack.DIN, productCode, pack);

            if (pack.Status != Pack.StatusX.Produced)
            {
                PackBLL.ChangeStatus(pack.ID, Pack.StatusX.Produced, PackTransaction.TypeX.Out_Product);
            }
        }
コード例 #2
0
ファイル: PackOrderBLL.cs プロジェクト: ghostnguyen/redblood
        public static void Return(int returnID, int packOrderID, string note)
        {
            RedBloodDataContext db = new RedBloodDataContext();

            PackOrder po = Get4Return(db, packOrderID);

            po.ReturnID = returnID;

            db.SubmitChanges();

            PackBLL.ChangeStatus(po.Pack.ID, Pack.StatusX.Product, PackTransaction.TypeX.In_Return, note);
        }
コード例 #3
0
ファイル: PackBLL.cs プロジェクト: ghostnguyen/redblood
        public static void Delete(int deleteID, Guid packID, string note)
        {
            RedBloodDataContext db = new RedBloodDataContext();

            Pack p = Get4Delete(db, packID);

            p.DeleteID = deleteID;

            db.SubmitChanges();

            PackBLL.ChangeStatus(p.ID, Pack.StatusX.Delete, PackTransaction.TypeX.Out_Delete, note);
        }
コード例 #4
0
        public void Divide(Guid srcPackID, string division, int volume)
        {
            Pack pack = PackBLL.Get4Extract(srcPackID);

            string newProductCode = pack.ProductCode.Substring(0, pack.ProductCode.Length - 2) + division;

            PackBLL.Add(pack.DIN, newProductCode, volume, orgPack: pack);

            if (pack.Status != Pack.StatusX.Produced)
            {
                PackBLL.ChangeStatus(pack.ID, Pack.StatusX.Produced, PackTransaction.TypeX.Out_Product);
            }
        }
コード例 #5
0
ファイル: PackOrderBLL.cs プロジェクト: ghostnguyen/redblood
        public static void Add(int orderID, string DIN, string productCode)
        {
            RedBloodDataContext db = new RedBloodDataContext();

            Order r = OrderBLL.Get4Add(orderID);
            Pack  p = PackBLL.Get4Order(DIN, productCode);

            PackOrder po = new PackOrder();

            po.OrderID = r.ID;
            po.PackID  = p.ID;

            db.PackOrders.InsertOnSubmit(po);
            db.SubmitChanges();

            PackTransaction.TypeX transType = r.Type == Order.TypeX.ForCR ? PackTransaction.TypeX.Out_Order4CR
                : r.Type == Order.TypeX.ForOrg ? PackTransaction.TypeX.Out_Order4Org
                : PackTransaction.TypeX.Out_OrderGen;

            PackBLL.ChangeStatus(p.ID, Pack.StatusX.Delivered, transType, "PackOrderID = " + po.ID.ToString());
        }