Beispiel #1
0
 protected void btnItemTrack_Click(object sender, EventArgs e)
 {
     try
     {
         TextBox txtQunatity    = ((TextBox)rptOutput.Items[((RepeaterItem)((LinkButton)sender).NamingContainer).ItemIndex].FindControl("txtOut"));
         Label   lblDimCode1    = ((Label)rptOutput.Items[((RepeaterItem)((LinkButton)sender).NamingContainer).ItemIndex].FindControl("lblDimCode1"));
         decimal DefaultDecimal = 0;
         if (decimal.TryParse(txtQunatity.Text, out DefaultDecimal) == false)
         {
             objTools.jsWarning(this.Page, "Enter Quantity Proper.");
             txtQunatity.Focus();
         }
         else
         {
             string    LocationCode = Convert.ToString(Server.UrlDecode(Request.QueryString["LocationCode"]));
             string    ItemNo       = lblDimCode1.Text; //Convert.ToString(Request.QueryString["ItemNo"]);
             DataTable dtLotNos     = objSQLServer.Fill_Datatable(objSQL.VendorConn, "JAY$Item Ledger Entry_getLotNos", new string[] { ItemNo, LocationCode });
             if (dtLotNos.Rows.Count > 0)
             {
                 pnlItemTracking.Visible = true;
                 hfItemTrackRowQty.Value = txtQunatity.Text;
                 txtQuantityList.Text    = txtQunatity.Text;
                 rptLotList.DataSource   = dtLotNos;
                 rptLotList.DataBind();
                 for (int i = 0; i < rptLotList.Items.Count; i++)
                 {
                     ((TextBox)rptLotList.Items[i].FindControl("txtUsingQty")).Text = "0.00";
                 }
                 lblQtyUntilizeSum.Text = getItemTrackQTYUsedSum().ToString();
                 hfQtyUntilizeSum.Value = getItemTrackQTYUsedSum().ToString();
                 hdnFieldItemNo.Value   = lblDimCode1.Text;
             }
             else
             {
                 objTools.jsWarning(this.Page, "Sorry, Not found any Item Tracking List.");
             }
         }
     }
     catch (Exception ex)
     {
         objTools.jsError(this.Page, ex.Message.ToString());
     }
 }