protected void UpdateButton_Click(object sender, ImageClickEventArgs e) { // string UserName = ((Session["UserName"] != null) ? Session["UserName"].ToString() : "Unknown"); int result = SqlHelper.ExecuteNonQuery(connectionString, "pGERMoveFromHist", new SqlParameter("@BOL", BOLNumberBox.Text), new SqlParameter("@EntryID", UserName)); lblSuccessMessage.Text = "BOL ready to be processed in GER maintenance."; //SqlStatement = " select BOLNo, ProcessRecInd from ( "; //SqlStatement += " Select BOLNo, case GERProcess.ProcessRecInd when 1 then 'Now' else 'Nightly' end as ProcessRecInd "; //SqlStatement += " FROM GERProcess, "; //SqlStatement += " (SELECT * "; //SqlStatement += " FROM GERDetail "; //SqlStatement += " WHERE (BOLNo = '" + BOLNumberBox.Text + "')) GERDtl"; //SqlStatement += " WHERE GERDtl.pGERDtlID = GERProcess.GERDetailID "; //SqlStatement += " and GERProcess.ProcessDt IS NULL) GetMstr "; //SqlStatement += " group by BOLNo, ProcessRecInd"; //dsGER = SqlHelper.ExecuteDataset(connectionString, CommandType.Text, SqlStatement); //dtBOLData = dsGER.Tables[0]; //ResultsGridView.DataSource = dtBOLData; //ResultsGridView.DataBind(); //ResultsGridView.Visible = true; UpdateButton.Visible = false; BOLNumberBox.Focus(); }
protected void UpdateButton_Click(object sender, ImageClickEventArgs e) { // DataSet dsGER = new DataSet(); string SqlStatement = "UPDATE GERProcess "; SqlStatement += " SET GERProcess.ProcessRecInd = '1' "; SqlStatement += " FROM GERProcess, "; SqlStatement += " (SELECT * "; SqlStatement += " FROM GERDetail "; SqlStatement += " WHERE (BOLNo = '" + BOLNumberBox.Text + "')) GERDtl"; SqlStatement += " WHERE GERDtl.pGERDtlID = GERProcess.GERDetailID "; SqlStatement += " and GERProcess.ProcessDt IS NULL "; int iRslt = SqlHelper.ExecuteNonQuery(connectionString, CommandType.Text, SqlStatement); lblSuccessMessage.Text = "Number of BOL Lines Updated : " + iRslt.ToString(); SqlStatement = " select BOLNo, ProcessRecInd from ( "; SqlStatement += " Select BOLNo, case GERProcess.ProcessRecInd when 1 then 'Now' else 'Nightly' end as ProcessRecInd "; SqlStatement += " FROM GERProcess, "; SqlStatement += " (SELECT * "; SqlStatement += " FROM GERDetail "; SqlStatement += " WHERE (BOLNo = '" + BOLNumberBox.Text + "')) GERDtl"; SqlStatement += " WHERE GERDtl.pGERDtlID = GERProcess.GERDetailID "; SqlStatement += " and GERProcess.ProcessDt IS NULL) GetMstr "; SqlStatement += " group by BOLNo, ProcessRecInd"; dsGER = SqlHelper.ExecuteDataset(connectionString, CommandType.Text, SqlStatement); dtBOLData = dsGER.Tables[0]; ResultsGridView.DataSource = dtBOLData; ResultsGridView.DataBind(); ResultsGridView.Visible = true; UpdateButton.Visible = false; BOLNumberBox.Focus(); }
protected void Page_Load(object sender, EventArgs e) { Ajax.Utility.RegisterTypeForAjax(typeof(BOLHistDetail)); if (!IsPostBack) { lblSuccessMessage.Text = "Enter BOL Number"; BOLNumberBox.Focus(); // if the page is called from GERFilter page if (Request.QueryString["BOLNo"] != null && Request.QueryString["BOLNo"].ToString() != "") { lblErrorMessage.Text = ""; BOLNumberBox.Text = Request.QueryString["BOLNo"].ToString(); if (BindBOLData(BOLNumberBox.Text)) { BOLDetail.Focus(); } lblSuccessMessage.Text = ""; } } if (IsPostBack) { lblErrorMessage.Text = ""; if (BindBOLData(BOLNumberBox.Text)) { BOLDetail.Focus(); } lblSuccessMessage.Text = ""; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { lblSuccessMessage.Text = "Enter BOL Number"; } if (IsPostBack) { lblErrorMessage.Text = ""; BindBOLData(BOLNumberBox.Text); lblSuccessMessage.Text = ""; } BOLNumberBox.Focus(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { lblSuccessMessage.Text = "Enter BOL Number"; } if (IsPostBack) { lblErrorMessage.Text = ""; BindBOLData(BOLNumberBox.Text); lblSuccessMessage.Text = ""; DataPanel.Height = int.Parse(yh.Value.ToString()) - 120; } BOLNumberBox.Focus(); }