protected void lnkUpdate_Click(object sender, EventArgs e) { try { decimal totalUntilizeQty = objTools.getDecimal(hfItemTrackRowQty.Value) - objTools.getDecimal(hfQtyUntilizeSum.Value); if (objTools.getDecimal(hfQtyUntilizeSum.Value) <= 0) { objTools.jsWarning(this.Page, ""); } else if (totalUntilizeQty != 0) { objTools.jsWarning(this.Page, ""); } else { foreach (RepeaterItem itemEquipment in rptLotList.Items) { ItemTrackList LineItemTrack = new ItemTrackList(); bool check = (itemEquipment.FindControl("chkLotSelect") as CheckBox).Checked; string Qty = (itemEquipment.FindControl("txtUsingQty") as TextBox).Text; string LotNo = (itemEquipment.FindControl("LotNo") as Label).Text; if (check) { if (!string.IsNullOrEmpty(Qty)) { LineItemTrack.Quanity = Convert.ToDecimal(Qty); LineItemTrack.LotNo = LotNo; LineItemTrack.TrackItemCode = hdnFieldItemNo.Value; addTrackList(LineItemTrack); BindTrack(); } } } pnlItemTracking.Visible = false; } } catch (Exception ex) { objTools.jsError(this.Page, ex.Message.ToString()); } }
public void addTrackList(ItemTrackList LineTrackList) { setTrackList(); ((List <ItemTrackList>)objSession.getSession(HttpContext.Current, "TrackSessionState")).Add(LineTrackList); }