protected void lnkShow_Click(object sender, EventArgs e) { try { int ItemIndex = ((RepeaterItem)((LinkButton)sender).NamingContainer).ItemIndex; ItemTrackDetails.DataSource = getTrackList().Where(x => x.TrackItemCode == ((Label)rptOutput.Items[ItemIndex].FindControl("lblDimCode1")).Text); ItemTrackDetails.DataBind(); pnlTrackingDetails.Visible = true; } catch (Exception ex) { objTools.jsError(this.Page, ex.Message.ToString()); } }
protected void btnSave_Click(object sender, EventArgs e) { try { NetworkCredential NetCredentials = new NetworkCredential(); NetCredentials.UserName = SessionManager.GetNAVUserName(HttpContext.Current); NetCredentials.Password = SessionManager.GetNAVUserPassword(HttpContext.Current); ItemTrackDetails.DataSource = getTrackList(); ItemTrackDetails.DataBind(); foreach (RepeaterItem itemEquipment in ItemTrackDetails.Items) { string lblLotNo = (itemEquipment.FindControl("lblLotNo") as Label).Text; string Qty = (itemEquipment.FindControl("lblQty") as Label).Text; string lblDimenItem = (itemEquipment.FindControl("lblDimenItem") as Label).Text; Decimal quantity = 0; if (Qty != null && Qty != "") { if (Qty != null) { quantity = Convert.ToDecimal(Qty); } Web_Order_Mail objser = new Web_Order_Mail(); objser.UseDefaultCredentials = true; objser.Credentials = NetCredentials; objser.CreateItemJournal(1, Request.QueryString["No"], Convert.ToDecimal(Qty), string.Empty, lblDimenItem, Convert.ToDateTime(txtPostingDate.Text), Convert.ToDateTime(txtDocumentDate.Text), Convert.ToString(Session["NavUserName"]), lblLotNo); objser = null; } } } catch (Exception ex) { var message1 = new JavaScriptSerializer().Serialize(ex.Message.ToString()); var script1 = string.Format("alert({0});", message1); ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "", script1, true); } }
public void SetTrackListDetails() { ItemTrackDetails.DataSource = getTrackList(); ItemTrackDetails.DataBind(); }