protected void GetProductTransferOrderProductListById(string transferOrderId) { ProductTransferOrderBLL productTransferOrder = new ProductTransferOrderBLL(); try { DataTable dt = productTransferOrder.GetProductTransferOrderProductListById(transferOrderId, requisitionIdLabel.Text.Trim(), descriptionLabel.Text.Trim()); if (dt.Rows.Count > 0) { productTransferOrderProductListGridView.DataSource = dt; productTransferOrderProductListGridView.DataBind(); if (productTransferOrderProductListGridView.Rows.Count > 0) { productTransferOrderProductListGridView.UseAccessibleHeader = true; productTransferOrderProductListGridView.HeaderRow.TableSection = TableRowSection.TableHeader; } } else { msgbox.Visible = true; msgTitleLabel.Text = "Data Not Found!!!"; msgDetailLabel.Text = ""; } } catch (Exception ex) { msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message; } finally { productTransferOrder = null; } }
protected void GetProductTransferOrderProductListById(string transferOrderId) { ProductTransferOrderBLL productTransferOrder = new ProductTransferOrderBLL(); try { DataTable dt = productTransferOrder.GetProductTransferOrderProductListById(transferOrderId, requisitionIdLabel.Text.Trim(), descriptionLabel.Text.Trim()); if (dt.Rows.Count > 0) { productTransferOrderProductListGridView.DataSource = dt; productTransferOrderProductListGridView.DataBind(); for (int i = 0; i < dt.Rows.Count; i++) { TextBox receivedQuantityTextBox = (TextBox)productTransferOrderProductListGridView.Rows[i].FindControl("receivedQuantityTextBox"); receivedQuantityTextBox.Text = dt.Rows[i]["ApprovedQuantity"].ToString(); } if (productTransferOrderProductListGridView.Rows.Count > 0) { productTransferOrderProductListGridView.UseAccessibleHeader = true; productTransferOrderProductListGridView.HeaderRow.TableSection = TableRowSection.TableHeader; saveButton.Enabled = true; } else { saveButton.Enabled = false; } } else { msgbox.Visible = true; msgTitleLabel.Text = "Data Not Found!!!"; msgDetailLabel.Text = ""; } } catch (Exception ex) { msgbox.Visible = true; msgTitleLabel.Text = "Exception!!!"; msgDetailLabel.Text = ex.Message; } finally { productTransferOrder = null; } }