public DataSet BindGridSalesOrder(GridView gvSearch, Label lblRowCount) { DataSet dstData = new DataSet(); SqlParameter[] sqlParamSrh = { new SqlParameter("@Type", "BIND_PENDING_GRID"), new SqlParameter("@Column_name", ""), new SqlParameter("@SearchCriteria", ""), new SqlParameter("@Active_Flag", "1"), new SqlParameter("@ASC_Id", this.ASC_Id), }; dstData = objCommonClass.BindDataGrid(gvSearch, "uspSalesOrderReceipts", true, sqlParamSrh, true); DataView dvSource = default(DataView); dvSource = dstData.Tables[0].DefaultView; //dvSource.Sort = strOrder; if ((dstData != null)) { lblRowCount.Text = dstData.Tables[0].Rows.Count.ToString(); gvSearch.DataSource = dvSource; gvSearch.DataBind(); } //dstData = null; dvSource.Dispose(); dvSource = null; return(dstData); }
protected void Page_Load(object sender, EventArgs e) { sqlParamSrh[4].Value = int.Parse(rdoboth.SelectedValue); sqlParamSrh[5].Value = objActivityParameterMaster.UserName = Membership.GetUser().UserName.ToString(); lblMessage.Text = ""; if (!Page.IsPostBack) { //Filling Countries to grid of calling BindDataGrid of CommonClass objCommonClass.BindDataGrid(gvComm, "uspRateMaster", true, sqlParamSrh, lblRowCount); objActivityParameterMaster.BindUnitSno(ddlUnitSno); objActivityParameterMaster.BindUOM(ddlUOM); ddlActivityCode.Items.Insert(0, new ListItem("Select", "0")); ddlParamCode1.Items.Insert(0, new ListItem("Select", "0")); ddlParamCode2.Items.Insert(0, new ListItem("Select", "0")); ddlParamCode3.Items.Insert(0, new ListItem("Select", "0")); ddlParamCode4.Items.Insert(0, new ListItem("Select", "0")); ddlPossibleValue1.Items.Insert(0, new ListItem("Select", "0")); ddlPossibleValue2.Items.Insert(0, new ListItem("Select", "0")); ddlPossibleValue3.Items.Insert(0, new ListItem("Select", "0")); ddlPossibleValue4.Items.Insert(0, new ListItem("Select", "0")); imgBtnUpdate.Visible = false; ViewState["Column"] = "Activity_Code"; ViewState["Order"] = "ASC"; string url = "../Admin/RateMasterForASC.aspx"; string fullURL = "window.open('" + url + "', '_blank', 'height=600,width=900,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,titlebar=no' );"; LnkbRateMasterForASC.Attributes.Add("OnClick", fullURL); } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); }
protected void Page_Load(object sender, EventArgs e) { sqlParamSrh[3].Value = int.Parse(rdoboth.SelectedValue); if (!Page.IsPostBack) { objCommonClass.BindDataGrid(gvComm, "uspIncoTerms", true, sqlParamSrh, lblRowCount); imgBtnUpdate.Visible = false; ViewState["Column"] = "Inco_Terms_Code"; ViewState["Order"] = "ASC"; } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); }
//FOR FILTERING ACTIVE AND INACTIVE RECORDS protected void imgBtnGo_Click(object sender, EventArgs e) { if (gvComm.PageIndex != -1) { gvComm.PageIndex = 0; } sqlParamSrh[1].Value = ddlSearch.SelectedValue.ToString(); sqlParamSrh[2].Value = txtSearch.Text.Trim(); sqlParamSrh[3].Value = rdoboth.SelectedValue.ToString(); objCommonClass.BindDataGrid(gvComm, "uspParameterMaster", true, sqlParamSrh, lblRowCount); }
protected void imgBtnGo_Click(object sender, EventArgs e) { if (gvComm.PageIndex != -1) { gvComm.PageIndex = 0; } sqlParamSrh[1].Value = ddlSearch.SelectedValue.ToString(); sqlParamSrh[2].Value = txtSearch.Text.Trim(); sqlParamSrh[3].Value = rdoboth.SelectedValue.ToString(); sqlParamSrh[4].Value = User.Identity.Name; sqlParamSrh[5].Value = Convert.ToInt32(DDlProdDiv.SelectedValue); objCommonClass.BindDataGrid(gvComm, "uspSpareMaster", true, sqlParamSrh, lblRowCount); }
public void BindData(GridView grv, GridView gv2, Label rowcount) { SqlParameter[] sqlParamSrh = { // new SqlParameter("@MessageOut",SqlDbType.VarChar,200), // new SqlParameter("@Type","SELECT"), new SqlParameter("@Type", "BINDGRID"), new SqlParameter("@region_sno", this.Region_Sno), new SqlParameter("@branch_sno", this.Branch_SNo), new SqlParameter("@proddivsno", this.ProductDivision_Id), new SqlParameter("@prodprodlinesno", this.ProductLine_Id), new SqlParameter("@prodprodgroupsno", this.ProductGroup_Id), new SqlParameter("@activityid", this.Activity_Id), new SqlParameter("@warrantystatus", this.WarrantyStatus), new SqlParameter("@datefrom", this.From_Date), new SqlParameter("@dateto", this.To_Date), }; // sqlParamSrh[0].Direction = ParameterDirection.Output; dstData = objCommonClass.BindDataGrid(grv, "uspServiceCostReport", true, sqlParamSrh, true); if (dstData.Tables[0].Rows.Count > 0) { rowcount.Text = dstData.Tables[0].Rows.Count.ToString(); } else { rowcount.Text = "0"; } DataTable dt = dstData.Tables[1]; gv2.DataSource = dt; gv2.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { sqlParamSrh[3].Value = rdoboth.SelectedValue.ToString(); sqlParamSrh[4].Value = objActivityParameterMappingMaster.UserName = Membership.GetUser().UserName; if (!Page.IsPostBack) { objCommonClass.BindDataGrid(gvComm, "uspActivityParameterMapping", true, sqlParamSrh, lblRowCount); objActivityParameterMappingMaster.BindProductDiv(ddlProductDivisionId); ddlActivity.Items.Insert(0, new ListItem("Select", "0")); ddlParameter.Items.Insert(0, new ListItem("Select", "0")); imgBtnUpdate.Visible = false; ViewState["Column"] = "ProductDivision_Id"; ViewState["Order"] = "ASC"; } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); }
protected void Page_Load(object sender, EventArgs e) { sqlParamSrh[3].Value = rdoboth.SelectedValue.ToString(); sqlParamSrh[4].Value = objParameterPossibleValueMaster.UserName = Membership.GetUser().UserName; if (!Page.IsPostBack) { objCommonClass.BindDataGrid(gvComm, "uspParameterPossibleValue", true, sqlParamSrh, lblRowCount); objParameterPossibleValueMaster.BindUnitDesc(ddlDivision); ddlParameter.Items.Insert(0, new ListItem("Select", "0")); // objParameterPossibleValueMaster.BindParameter(ddlParameter); imgBtnUpdate.Visible = false; ViewState["Column"] = "ParameterPossible_Id"; ViewState["Order"] = "ASC"; } System.Threading.Thread.Sleep(Convert.ToInt32(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); }
protected void BindGridView() { try { double Amount = 0; SqlParameter[] sqlParamS = { new SqlParameter("@IBN", lbltransactionno.Text), new SqlParameter("@Type", "GET_DATA") }; objcommon.BindDataGrid(gvChallanDetail, "uspPrintInternalBill", true, sqlParamS, lblRowCount); foreach (GridViewRow item in gvChallanDetail.Rows) { Amount = Amount + Convert.ToDouble(item.Cells[10].Text); } lbltotalamount.Text = Amount.ToString(); if (lblRowCount.Text.Trim() == "" || lblRowCount.Text.Trim() == "0") { ScriptManager.RegisterClientScriptBlock(imgBtnClose, GetType(), "Alert", "alert('Invalid IBN No');window.close();", true); } } catch (Exception ex) { SIMSCommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { sqlParamSrh[3].Value = int.Parse(rdoboth.SelectedValue); if (!Page.IsPostBack) { objSIMSCommonClass.BindDataGrid(gvComm, "uspSpareBOMMaster", true, sqlParamSrh, lblRowCount); VisibleMakeActiveInactiveButton(); #region Bind All DropDown objSpareBOMMaster.BindDivision(ddlDivision); ddlProductLine.Items.Insert(0, new ListItem("Select", "0")); ddlFGCode.Items.Insert(0, new ListItem("Select", "0")); ddlSpareCode.Items.Insert(0, new ListItem("Select", "0")); //objSpareBOMMaster.BindSpare(ddlSpareCode); ddlAltSpareCode1.Items.Insert(0, new ListItem("Select", "0")); ddlAltSpareCode2.Items.Insert(0, new ListItem("Select", "0")); ddlAltSpareCode3.Items.Insert(0, new ListItem("Select", "0")); ddlAltSpareCode4.Items.Insert(0, new ListItem("Select", "0")); #endregion //imgBtnUpdate.Visible = false; imgBtnUpdate.Style.Add("display", "none"); ViewState["Column"] = "Spare_BOM_Id"; ViewState["Order"] = "ASC"; } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); }
public DataSet BindData(GridView grv) { SqlParameter[] sqlParamSrh = { new SqlParameter("@MessageOut", SqlDbType.VarChar, 200), new SqlParameter("@Type", "SELECT"), new SqlParameter("@Region_Sno", this.Region_Sno), new SqlParameter("@Branch_Sno", this.Branch_SNo), new SqlParameter("@ProductDivision_Id", this.ProductDivision_Id), new SqlParameter("@From_Date", this.From_Date), new SqlParameter("@To_Date", this.To_Date), new SqlParameter("@ASC_Id", this.ASC_Id), new SqlParameter("@IsDelivered", this.IsDelivered) }; sqlParamSrh[0].Direction = ParameterDirection.Output; dstData = objCommonClass.BindDataGrid(grv, "uspRPTSimsIndent", true, sqlParamSrh, true); return(dstData); }
protected void Page_Load(object sender, EventArgs e) { sqlParamSrh[3].Value = int.Parse(rdoboth.SelectedValue); if (!Page.IsPostBack) { objCommonClass.BindDataGrid(gvComm, "uspVendorSpareMapping", true, sqlParamSrh, lblRowCount); imgBtnUpdate.Visible = false; ViewState["Column"] = "SpareMapping_Id"; ViewState["Order"] = "ASC"; #region BIND ALL DROPDOWN objSpareMappingMaster.BindVendor(ddlVendorCode); objSpareMappingMaster.BindDivision(ddlDivision); ddlSpare.Items.Insert(0, new ListItem("Select", "0")); #endregion } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); }
protected void Page_Load(object sender, EventArgs e) { txtAvgConsumption.Attributes.Add("OnChange", "return NumericOnly();"); sqlParamSrh[3].Value = int.Parse(rdoboth.SelectedValue); if (!Page.IsPostBack) { objCommonClass.BindDataGrid(gvComm, "uspASCSpecificSpareMaster", true, sqlParamSrh, lblRowCount); objASCSpecificSpare.EmpCode = Membership.GetUser().UserName.ToString(); objASCSpecificSpare.BindASCCode(ddlASCCode); ddlProductDivision.Items.Insert(0, new ListItem("Select", "Select")); //ddlLocation.Items.Insert(0, new ListItem("Select", "Select")); ddlSpare.Items.Insert(0, new ListItem("Select", "Select")); imgBtnUpdate.Visible = false; ViewState["Column"] = "SC_Name"; ViewState["Order"] = "ASC"; } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); }
protected void imgBtnGo_Click(object sender, EventArgs e) { if (gvSearch.PageIndex != -1) { gvSearch.PageIndex = 0; } sqlParamSrh[1].Value = ddlSearch.SelectedValue.ToString(); sqlParamSrh[2].Value = txtSearch.Text.Trim(); sqlParamSrh[3].Value = hdnASC_Id.Value; objCommonClass.BindDataGrid(gvSearch, "uspSalesOrderReceipts", true, sqlParamSrh, lblRowCount); }
//FOR FILTERING ACTIVE AND INACTIVE RECORDS protected void imgBtnGo_Click(object sender, EventArgs e) { if (gvComm.PageIndex != -1) { gvComm.PageIndex = 0; } sqlParamSrh[1].Value = ddlSearch.SelectedValue.ToString(); sqlParamSrh[2].Value = txtSearch.Text.Trim(); sqlParamSrh[3].Value = "1"; if (ddlSearch.SelectedItem.Value == "MSC.SC_Name") { sqlParamSrh[4].Value = "0"; } else { sqlParamSrh[4].Value = ddlASCCode.SelectedItem.Value; } objCommonClass.BindDataGrid(gvComm, "uspStockUpdateMaster", true, sqlParamSrh, lblRowCount); FillDropDownToolTip(); }
public DataSet BindData(GridView grv) { SqlParameter[] sqlParamSrh = { new SqlParameter("@MessageOut", SqlDbType.VarChar, 200), new SqlParameter("@Type", "SELECT"), new SqlParameter("@From_Date", this.From_Date), new SqlParameter("@To_Date", this.To_Date) }; sqlParamSrh[0].Direction = ParameterDirection.Output; dstData = objCommonClass.BindDataGrid(grv, "uspRPTAvgSummaryCostforWithinWarranty", true, sqlParamSrh, true); return(dstData); }
protected void Page_Load(object sender, EventArgs e) { sqlParamSrh[3].Value = int.Parse(rdoboth.SelectedValue); if (!Page.IsPostBack) { //Code Added By Pravesh////////////// // objCommonClass.EmpID = Membership.GetUser().UserName.ToString(); // ds = objCommonClass.GetRegionID(); // if (ds.Tables[0].Rows.Count != 0) // objCommonClass.RegionID=int.Parse(ds.Tables[0].Rows[0]["Region_SNo"].ToString()); // SqlParameter[] sqlParamSrhByRegionID = //{ // new SqlParameter("@Type","SEARCHBYREGIONID"), // new SqlParameter("@Column_name",""), // new SqlParameter("@SearchCriteria",""), // new SqlParameter("@Region_SNo",objCommonClass.RegionID), // new SqlParameter("@Active_Flag","1") //}; // if (objCommonClass.RegionID != 0) // sqlParamSrh = sqlParamSrhByRegionID; //////////////////////////////////// //Filling Countries to grid of calling BindDataGrid of CommonClass objCommonClass.BindDataGrid(gvServiceContractor, "uspServiceContractorMaster", true, sqlParamSrh, lblRowCount); objServiceContractorMaster.BindRegionCode(ddlRegion); //objBranchMaster.BindRegionCode(ddlRegion); objServiceContractorMaster.BindScState(ddlState); ddlBranch.Items.Insert(0, new ListItem("Select", "Select")); ddlBranchPlant.Items.Insert(0, new ListItem("Select", "Select")); ddlCity.Items.Insert(0, new ListItem("Select", "Select")); imgBtnUpdate.Visible = false; ViewState["Column"] = "SC_Code"; ViewState["Order"] = "ASC"; } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { try { if (Page.Request.QueryString["transactionno"] != null) { hdnDraft_No.Value = Convert.ToString(Page.Request.QueryString["transactionno"]); } else if (Page.Request.QueryString["draftno"] != null) { hdnDraft_No.Value = Convert.ToString(Page.Request.QueryString["draftno"]); } objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString()); lblASCName.Text = objCommonClass.ASC_Name; hdnASC_Code.Value = Convert.ToString(objCommonClass.ASC_Id); txtECCNumber.Text = Convert.ToString(objCommonClass.ECC_Number); txtTINNumber.Text = Convert.ToString(objCommonClass.TIN_Number); objSpareRequirementIndentConfirm.ASC_Id = Convert.ToInt32(hdnASC_Code.Value); objSpareRequirementIndentConfirm.Draft_No = hdnDraft_No.Value; objSpareRequirementIndentConfirm.BindASCProductDivision(lblProductDivision, hdnProductDivId); objSpareRequirementIndentConfirm.ProductDivision_Id = Convert.ToInt32(hdnProductDivId.Value); objSpareRequirementIndentConfirm.BindASCBranchPlant(lblBranchPlant); sqlParamSrh[1].Value = hdnASC_Code.Value; sqlParamSrh[2].Value = hdnProductDivId.Value; sqlParamSrh[3].Value = hdnDraft_No.Value; objCommonClass.BindDataGrid(gvComm, "uspSpareRequirementIndentConfirm", true, sqlParamSrh, lblRowCount); lbldate.Text = DateTime.Today.ToString(); objSpareRequirementIndentConfirm.BindScState(ddlState); ddlCity.Items.Insert(0, new ListItem("Select", "0")); objSpareRequirementIndentConfirm.BindDropDown(ddlSalesOrderType, "SELECT_SALES_ORDER_TYPE", "Sales_Order_Type_Id", "Sales_Order_Type_Desc"); objSpareRequirementIndentConfirm.BindDropDown(ddlTaxFormType, "SELECT_TAX_FORM_TYPE", "Tax_Form_Type_Id", "Tax_Form_Type_Desc"); objSpareRequirementIndentConfirm.BindDropDown(ddlIncoTerms, "SELECT_INCO_TERMS", "Inco_Terms_Id", "Inco_Terms_Desc"); getTotalAmount(); if (Page.Request.QueryString["draftno"] != null) { FillDraftInformation(); } BindPartDeliveryGrid(); } catch (Exception ex) { SIMSCommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString()); //Response.Redirect("../../Pages/Default.aspx"); } } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); }
public DataSet BindData(GridView grv) { SqlParameter[] sqlParamSrh = { new SqlParameter("@MessageOut", SqlDbType.VarChar, 200), new SqlParameter("@Type", "SELECT"), new SqlParameter("@Region_Sno", this.Region_Sno), new SqlParameter("@Branch_Sno", this.Branch_SNo), new SqlParameter("@ProductDivision_Id", this.ProductDivision_Id), new SqlParameter("@ASC_Id", this.ASC_Id) }; sqlParamSrh[0].Direction = ParameterDirection.Output; dstData = objCommonClass.BindDataGrid(grv, "uspRPTComplaintPendingForSpare", true, sqlParamSrh, true); return(dstData); }
protected void Page_Load(object sender, EventArgs e) { sqlParamSrh[3].Value = int.Parse(rdoboth.SelectedValue); if (!Page.IsPostBack) { objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString()); lblASCName.Text = Convert.ToString(objCommonClass.ASC_Name); hdnASC_Id.Value = Convert.ToString(objCommonClass.ASC_Id); //ddlServiceEng.Items.Insert(0, new ListItem("Select", "Select")); objASCLocMaster.BindEngineerCode(ddlServiceEng, hdnASC_Id.Value); sqlParamSrh[4].Value = hdnASC_Id.Value; objCommonClass.BindDataGrid(gvComm, "uspASCLocationMaster", true, sqlParamSrh, lblRowCount); //objASCLocMaster.BindASCCode(ddlASCCode); imgBtnUpdate.Visible = false; ViewState["Column"] = "Loc_Code"; ViewState["Order"] = "ASC"; } if (lblASCName.Text.Trim() == "") { imgBtnAdd.Enabled = false; imgBtnUpdate.Enabled = false; } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); }
private void FillDeliveryGrid() { try { sqlParamSrh[0].Value = "FILL_PART_DELIVERY_GRID"; sqlParamSrh[1].Value = hdn_Ordered_Transaction_No.Value; objCommonClass.BindDataGrid(gvComm, "uspDeliverySchedule", true, sqlParamSrh, lblRowCount); int TotalOrderedQty = 0; for (int k = 0; k < gvComm.Rows.Count; k++) { TotalOrderedQty = TotalOrderedQty + Convert.ToInt32(gvComm.Rows[k].Cells[3].Text); } TotalOrderedQty = Convert.ToInt32(lblOrderedQty.Text) - TotalOrderedQty; txtRemainingQty.Text = TotalOrderedQty.ToString(); } catch { } }
public DataSet BindData(GridView grv) { SqlParameter[] sqlParamSrh = { new SqlParameter("@MessageOut", SqlDbType.VarChar, 200), new SqlParameter("@Type", "SELECT"), new SqlParameter("@Region_Sno", this.Region_Sno), new SqlParameter("@Branch_Sno", this.Branch_SNo), new SqlParameter("@ProductDivision_Id", this.ProductDivision_Id), new SqlParameter("@Spare_Id", this.Spare_Id), new SqlParameter("@From_Date", this.From_Date), new SqlParameter("@To_Date", this.To_Date), new SqlParameter("@ASC_Id", this.ASC_Id), new SqlParameter("@Vendor_Id", this.Vendor_Id) // 23 apr 12 bhawesh }; sqlParamSrh[0].Direction = ParameterDirection.Output; dstData = objCommonClass.BindDataGrid(grv, "uspRPTSpareStockMovementDetail", true, sqlParamSrh, true); return(dstData); }
protected void BindGridView() { try { double Amount = 0; SqlParameter[] sqlParamS = { new SqlParameter("@IBN", lbltransactionno.Text), new SqlParameter("@Type", "GET_DATA") }; objcommon.BindDataGrid(gvChallanDetail, "uspPrintInternalBill", true, sqlParamS, lblRowCount); foreach (GridViewRow item in gvChallanDetail.Rows) { Amount = Amount + Convert.ToDouble(item.Cells[10].Text); } lbltotalamount.Text = Amount.ToString(); } catch (Exception ex) { SIMSCommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { try { sqlParamSrh[4].Value = int.Parse(rdoboth.SelectedValue); lblMessage.Text = ""; if (!Page.IsPostBack) { objCommonClass.BindDataGrid(gvComm, "uspFGIntermediate", true, sqlParamSrh, lblRowCount); imgBtnUpdateFGIntmd.Visible = false; objFGIntermediateScreen.BindDdlUnit(ddlUnit); objFGIntermediateScreen.BindDDLProduct(ddlProduct); ViewState["Column"] = "Product_Code"; ViewState["Order"] = "ASC"; } System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); } catch (Exception ex) { SIMSCommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString()); } }
private void BindData() { objSalesOrder.LnkBtnPONumber = Request.QueryString["PONumber"].ToString(); hdnAllPONumbers.Value = Request.QueryString["PONumber"].ToString(); DataSet dstData = new DataSet(); SqlParameter[] sqlParamSrh = { new SqlParameter("@Type", "SEARCH_SALESORDER"), new SqlParameter("@ASC_Id", objSalesOrder.ASC_Id), new SqlParameter("@PO_Number", objSalesOrder.LnkBtnPONumber) }; dstData = objCommonClass.BindDataGrid(gvComm, "uspSalesOrderReceipts", true, sqlParamSrh, true); string strMsg = ""; if (dstData.Tables[0].Rows.Count > 0) { //Check Product Division //for (int i = 0; i < dstData.Tables[0].Rows.Count; i++) //{ // if (strMsg != "") // { // strMsg = strMsg.TrimEnd(','); // if (!strMsg.Contains(dstData.Tables[0].Rows[i]["Unit_Desc"].ToString())) // { // strMsg = strMsg + "," + (dstData.Tables[0].Rows[i]["Unit_Desc"].ToString()) + ","; // } // } // else // { // strMsg = strMsg + (dstData.Tables[0].Rows[i]["Unit_Desc"].ToString()) + ","; // } //} lblDivision.Text = dstData.Tables[0].Rows[0]["Unit_Desc"].ToString(); txtSONumber.Text = dstData.Tables[0].Rows[0]["SAP_Sales_Order"].ToString(); txtInvoiceNumber.Text = dstData.Tables[0].Rows[0]["SAP_Invoice_No"].ToString(); txtInvoiceDate.Text = dstData.Tables[0].Rows[0]["SAP_Invoice_Date"].ToString(); txtChallanNo.Text = dstData.Tables[0].Rows[0]["Challan_No"].ToString(); txtChallanDate.Text = dstData.Tables[0].Rows[0]["Challan_Date"].ToString(); gvComm.DataSource = dstData; gvComm.DataBind(); } if (txtSONumber.Text.Trim() != "") { txtSONumber.Enabled = false; } if (Convert.ToString(dstData.Tables[0].Rows[0]["IsSAPData"]) != "") { txtInvoiceNumber.Enabled = false; txtInvoiceDate.Enabled = false; txtChallanNo.Enabled = false; txtChallanDate.Enabled = false; } else { txtInvoiceNumber.Enabled = true; txtInvoiceDate.Enabled = true; txtChallanNo.Enabled = true; txtChallanDate.Enabled = true; } }
protected void Page_Load(object sender, EventArgs e) { System.Diagnostics.Stopwatch st = new System.Diagnostics.Stopwatch(); if (!Page.IsPostBack) { try { lblRate.Text = "0"; lblDiscount.Text = "0"; lblCurrentStock.Text = "0"; lblQtyPendingToBeReceived.Text = "0"; lblValue.Text = "0"; objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString()); lblASCName.Text = objCommonClass.ASC_Name; hdnASC_Code.Value = Convert.ToString(objCommonClass.ASC_Id); objSpareRequirementIndent.BindProductDivision(ddlProductDivision, hdnASC_Code.Value); ddlSpare.Items.Insert(0, new ListItem("Select", "Select")); //added by sandeep ddlComplaintNo.Items.Insert(0, new ListItem("Select", "Select")); lbldate.Text = DateTime.Today.ToString(); //objSpareRequirementIndent.BindASCCode(ddlASCCode); //Add By Binay-12-05-2010 objSpareRequirementIndent.BindProductDivision(ddlSpareDivision, hdnASC_Code.Value); if (ddlProductDivision.SelectedIndex == 0) { objSpareRequirementIndent.SpareSearch = txtSearchSpare.Text.Trim(); objSpareRequirementIndent.BindProductSpare(ddlSpare, "0"); sqlParamSrh[1].Value = hdnASC_Code.Value; sqlParamSrh[2].Value = "0"; //Add By Binay-13-09-2010 sqlParamSrh[3].Value = txtFindSpare.Text.Trim(); //end objCommonClass.BindDataGrid(gvComm, "uspSpareRequirementIndent", true, sqlParamSrh, lblRowCount); gvDrafted.DataSource = objSpareRequirementIndent.FillDraftGrid(hdnASC_Code.Value, "0"); //hdnASC_Code.Value added bhawesh 28 feb 12 gvDrafted.DataBind(); } else { objSpareRequirementIndent.SpareSearch = txtSearchSpare.Text.Trim(); objSpareRequirementIndent.BindProductSpare(ddlSpare, ddlProductDivision.SelectedItem.Value); sqlParamSrh[1].Value = hdnASC_Code.Value; sqlParamSrh[2].Value = ddlProductDivision.SelectedItem.Value; //Add By Binay-13-09-2010 sqlParamSrh[3].Value = txtFindSpare.Text.Trim(); //end objCommonClass.BindDataGrid(gvComm, "uspSpareRequirementIndent", true, sqlParamSrh, lblRowCount); gvDrafted.DataSource = objSpareRequirementIndent.FillDraftGrid(hdnASC_Code.Value, ddlProductDivision.SelectedItem.Value); gvDrafted.DataBind(); } //End } catch (Exception ex) { Response.Redirect("../../Pages/Default.aspx"); } } st.Start(); System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"])); st.Stop(); string str = ""; }