public void DeleteTicketType(int TicketType_Id) { cat_TicketType entity = new cat_TicketType { TicketTypeKey = TicketType_Id }; CommonResponse result = _cat_TicketTypeLogic.Delete(entity); }
public int CreateMOHeaderTag(MOTag MT) { Ticket _ticket = new Ticket(); MOTagHeader _moTagHeader = new MOTagHeader(); cat_TicketType cat = (cat_TicketType)_cat_TicketTypeLogic.ReadbyName(new cat_TicketType("MOTagHeader")).Result; int counter = GetLastCounter(); _ticket.cat_TicketTypeKey = cat.id; _ticket.InventoryEventKey = ActiveEventId; _ticket.TicketCounter = counter + 1; //_ticket.TicketCounter = MT.Counter; _moTagHeader.Planner = MT.Planner; _moTagHeader.MO = MT.MO; _moTagHeader.MO_Ln = MT.MO_Ln; _moTagHeader.MO_Status = MT.MO_Status; _moTagHeader.Order_Qty = MT.Order_Qty; _moTagHeader.Recv_Qty = MT.Recv_Qty; _moTagHeader.LineType = MT.LineType; _moTagHeader.FG_Qty_in_WIP = 0; _moTagHeader.Parent_Item_NO = MT.Parent_Item_NO; _moTagHeader.Parent_Item_Desc = MT.Parent_Item_Desc; _moTagHeader.Parent_ItemRef1 = MT.Parent_ItemRef1; _ticket.MOTagHeaders.Add(_moTagHeader); _ticket = (Ticket)(_ticketLogic.Create(_ticket).Result as Ticket); return(_ticket.TicketCounter); }
public void CreateCountTiket(TicketTag T) { if (ActiveEventId != 0) { Ticket _ticket = new Ticket(); cat_TicketType cat = (cat_TicketType)_cat_TicketTypeLogic.ReadbyName(new cat_TicketType("TicketCount")).Result; TicketCount _tag = new TicketCount(); _ticket.cat_TicketTypeKey = cat.id; _ticket.InventoryEventKey = ActiveEventId; _ticket.TicketCounter = T.Counter; _tag.ItemNumber = T.ItemNumber; _tag.ItemDescription = T.ItemDescription; _tag.ItemRef = T.ItemReference1; _tag.UM = T.ItemUM; _tag.STK = T.Stockroom; _tag.BIN = T.Bin; _tag.IC = T.InventoryCategory; _tag.InventoryQty = T.InventoryQuantity; _tag.LotNumber = T.LotNumber; _tag.ItemNumber_FSKey = T.ItemNumber_FSKey; _ticket.TicketCounts.Add(_tag); //_cat_TicketTypeLogic.AddCountTicket(_ticket); _ticketLogic.Create(_ticket); } }
public void UpdateTicketType(string Ticket_Type, string Type_Desc) { cat_TicketType entity = new cat_TicketType { TicketType = Ticket_Type, TicketTypeDescirption = Type_Desc }; _Response = _cat_TicketTypeLogic.Update(entity); }
public void CreateTicketType(string Ticket_Type, string Type_Description) { cat_TicketType entity = new cat_TicketType { TicketType = Ticket_Type, TicketTypeDescirption = Type_Description }; _Response = _cat_TicketTypeLogic.Create(entity); }
public void ReadTicketbyId(int Type_Id) { cat_TicketType entity = new cat_TicketType { TicketTypeKey = Type_Id, TicketType = "", TicketTypeDescirption = "" }; _Response = _cat_TicketTypeLogic.ReadbyId(entity); }
public void ReadTicketTypebyName(string Type_name) { cat_TicketType entity = new cat_TicketType { TicketTypeKey = 0, TicketType = Type_name, TicketTypeDescirption = "" }; _Response = _cat_TicketTypeLogic.ReadbyName(entity); }
public void CreateBlankBatch(int BlankQty) { if (ActiveEventId != 0) { int counter = 0; Ticket _ticket = new Ticket(); cat_TicketType cat = (cat_TicketType)_cat_TicketTypeLogic.ReadbyName(new cat_TicketType("TicketCount")).Result; TicketCount _tag = new TicketCount(); Ticket LastTag = new Ticket(); LastTag.InventoryEventKey = ActiveEventId; LastTag = (Ticket)_ticketLogic.GetLastTagID(LastTag).Result; if (LastTag != null) { counter = LastTag.TicketCounter; } else { counter = 0; } for (int i = 1; i <= BlankQty; i++) { _ticket.cat_TicketTypeKey = cat.id; _ticket.InventoryEventKey = ActiveEventId; //_ticket.TicketCounter = T.Counter; _ticket.TicketCounter = counter + i; _tag.ItemNumber = ""; _tag.ItemDescription = ""; _tag.ItemRef = ""; _tag.UM = ""; _tag.STK = ""; _tag.BIN = ""; _tag.IC = ""; _tag.InventoryQty = 0; _tag.LotNumber = ""; _tag.BlankTag = true; _ticket.TicketCounts.Add(_tag); //_cat_TicketTypeLogic.AddCountTicket(_ticket); _ticketLogic.Create(_ticket); } } }
public void CreateBlankCountTiket() { if (ActiveEventId != 0) { Ticket _ticket = new Ticket(); cat_TicketType cat = (cat_TicketType)_cat_TicketTypeLogic.ReadbyName(new cat_TicketType("TicketCount")).Result; TicketCount _tag = new TicketCount(); Ticket LastTag = new Ticket(); LastTag.InventoryEventKey = ActiveEventId; LastTag = (Ticket)_ticketLogic.GetLastTagID(LastTag).Result; //LastTag.InventoryEventKey = ActiveEventId; //LastTag = (Ticket)_ticketLogic.ReadbyId(LastTag).Result; _ticket.cat_TicketTypeKey = cat.id; _ticket.InventoryEventKey = ActiveEventId; //_ticket.TicketCounter = T.Counter; _ticket.TicketCounter = LastTag.TicketCounter + 1; _tag.ItemNumber = ""; _tag.ItemDescription = ""; _tag.ItemRef = ""; _tag.UM = ""; _tag.STK = ""; _tag.BIN = ""; _tag.IC = ""; _tag.InventoryQty = 0; _tag.LotNumber = ""; _tag.BlankTag = true; _ticket.TicketCounts.Add(_tag); //_cat_TicketTypeLogic.AddCountTicket(_ticket); _ticketLogic.Create(_ticket); } }