protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         //Filling Division to grid of calling BindDataGrid of CommonClass
         objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString());
         hdnASCId.Value = Convert.ToString(objCommonClass.ASC_Id);
         objStockUpdate.BindASCCode(ddlASCCode);
         ddlLocation.Items.Insert(0, new ListItem("Select", "0"));
         ddlDivision.Items.Insert(0, new ListItem("Select", "0"));
         ddlSpareCode.Items.Insert(0, new ListItem("Select", "0"));
         if (Convert.ToInt32(hdnASCId.Value) > 0)
         {
             for (int i = 0; i < ddlASCCode.Items.Count; i++)
             {
                 if (ddlASCCode.Items[i].Value == hdnASCId.Value)
                 {
                     ddlASCCode.SelectedIndex = i;
                     ddlASCCode.Enabled       = false;
                     break;
                 }
             }
             ddlSearch.Items.RemoveAt(0);
         }
         imgBtnUpdate.Visible = false;
         ViewState["Column"]  = "Storage_Loc_Id";
         ViewState["Order"]   = "ASC";
         //BindGrid();
         ddlASCCode_SelectedIndexChanged(null, null);
     }
     System.Threading.Thread.Sleep(Convert.ToInt32(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"]));
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString());
        hdnASC_Code.Value    = Convert.ToString(objCommonClass.ASC_Id);
        objSalesOrder.ASC_Id = hdnASC_Code.Value;

        if (!Page.IsPostBack)
        {
            try
            {
                ViewState["Column"] = "Spare_Receipt_Id";
                ViewState["Order"]  = "ASC";
                lblRowCount.Visible = false;
                if (!string.IsNullOrEmpty(Request.QueryString["PONumber"]))
                {
                    BindData();
                }
            }
            catch (Exception ex)
            {
                SIMSCommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString());
                //Response.Redirect("../../Pages/Default.aspx");
            }
        }
        System.Threading.Thread.Sleep(Convert.ToInt32(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"]));
    }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
            {
                objcommon.SelectASC_Name_Code(Membership.GetUser().UserName.ToString());
                lblASCName.Text = objcommon.ASC_Name;
                hdnASC_Id.Value = Convert.ToString(objcommon.ASC_Id);
                ObjGenerateInternalBill.ASC_Id = hdnASC_Id.Value;
                ObjGenerateInternalBill.BindDivision(ddlDivision);

                //added by bhawesh 19 may
                if (ddlDivision.SelectedIndex == 0)
                {
                    ObjGenerateInternalBill.BindActivityDDL(ddlServiceSpares, "0", hdnASC_Id.Value);
                }
                else
                {
                    ObjGenerateInternalBill.BindActivityDDL(ddlServiceSpares, ddlDivision.SelectedValue, hdnASC_Id.Value);
                }
                ObjGenerateInternalBill.BindGeneratedBill(ddlBills, hdnASC_Id.Value, ddlDivision.SelectedValue);
                imgBtnConfirm.Visible = false;
                ImgBtnCancel.Visible  = false;
                trRecordCount.Visible = false;

                // Bhawesh 13 dec 12 // commentted 2 jan 13
                // uncomment & update 24 June 13
                txtFromDate.Text = (new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1)).ToShortDateString();            // (DateTime.Today.AddDays(1 - DateTime.Now.Day)).ToShortDateString();
                txtToDate.Text   = DateTime.Today.ToShortDateString();


                //Add By Binay-12-05-2010
                lblMessage.Text       = "";
                trRecordCount.Visible = true;
                BindGridView();
                //End

                if (!string.IsNullOrEmpty(Request.QueryString["ReturnId"]))
                {
                    string divindex = Convert.ToString(Session["div"]);
                    ddlDivision.SelectedValue = divindex;
                    ddlDivision_SelectedIndexChanged(null, null);
                    if (Convert.ToString(Session["NewGenerate"]) == "Yes")
                    {
                        BtnSearch_Click(null, null);
                    }
                }
                // Bind Total Pending IBN Details: By Ashok 6/08/2014
                BindPendingIBN();
            }
        }
        catch (Exception ex)
        {
            SIMSCommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString());
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //if (Request.QueryString["Asc_Code"] != null)
         objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString());
         lblASCName.Text   = objCommonClass.ASC_Name;
         hdnASC_Code.Value = Convert.ToString(objCommonClass.ASC_Id);
         objStockMovLog.BindDDLDivision(ddlProdDivision);
         Fn_GVStockMovLog_Bind();
     }
 }
Пример #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        lblMessage.Text = "";
        if (ViewState["PageLoad"] == null)
        {
            ViewState["PageLoad"] = 0;
        }

        string ComplaintRefNo = (this.NamingContainer.FindControl("hdnActionComplaintRefNo") as HiddenField).Value;

        if (ComplaintRefNo != "")
        {
            if (Convert.ToInt16(ViewState["PageLoad"]) == 0 || lblComplaintNo.Text.Length < 11 || ComplaintRefNo != lblComplaintNo.Text)
            {
                ViewState["DataTableSpareReqComplt"] = null;
                objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString());
                lblASCName.Text    = objCommonClass.ASC_Name;
                hdnASC_Code.Value  = Convert.ToString(objCommonClass.ASC_Id);
                btnConfirm.Enabled = true;
                objSpareRequirementComplaint.Asc_Code     = objCommonClass.ASC_Id;
                objSpareRequirementComplaint.Complaint_No = ComplaintRefNo;
                dsComplaint = objSpareRequirementComplaint.BindComplaintData();
                if (dsComplaint.Tables[0] != null)
                {
                    if (dsComplaint.Tables[0].Rows.Count > 0)
                    {
                        lblComplaintNo.Text = objSpareRequirementComplaint.Complaint_No;
                        lblDivision.Text    = dsComplaint.Tables[0].Rows[0]["ProductDivision_Desc"].ToString();
                        lblProduct.Text     = dsComplaint.Tables[0].Rows[0]["Product_Desc"].ToString();
                        hdnDivSNo.Value     = dsComplaint.Tables[0].Rows[0]["ProductDivision_SNo"].ToString();
                        hdnProdSNo.Value    = dsComplaint.Tables[0].Rows[0]["Product_SNo"].ToString();
                    }
                }
                if (dsComplaint.Tables[1] != null)
                {
                    if (dsComplaint.Tables[1].Rows.Count > 0)
                    {
                        btnConfirm.Enabled = false;
                        lblMessage.Text    = "Advice has been alrady generated. Advice No : " + dsComplaint.Tables[1].Rows[0][0].ToString();
                        Adviceflag         = true;
                    }
                }
                Fn_Create_Table();


                Fn_Add(Adviceflag); //bp 30 oct 12
                ViewState["DataTableSpareReqComplt"] = DTSpareReqComplt;
            }
            ViewState["PageLoad"] = 1;
        }
        System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"]));
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        lblMessage.Text = "";

        if (!Page.IsPostBack)
        {
            string ComplaintRefNo = Request.QueryString["CompNo"];
            string SplitNo        = Request.QueryString["SplitNo"];

            ViewState["DataTableSpareReqComplt"] = null;
            objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString());
            lblASCName.Text   = objCommonClass.ASC_Name;
            hdnASC_Code.Value = Convert.ToString(objCommonClass.ASC_Id);

            objSpareRequirementComplaint.Asc_Code = objCommonClass.ASC_Id;
            if (ComplaintRefNo.Length == 10)
            {
                objSpareRequirementComplaint.Complaint_No = ComplaintRefNo + "/0" + SplitNo;
            }
            else
            {
                objSpareRequirementComplaint.Complaint_No = ComplaintRefNo;
            }
            dsComplaint = objSpareRequirementComplaint.BindComplaintData();
            if (dsComplaint.Tables[0] != null)
            {
                lblComplaintNo.Text = objSpareRequirementComplaint.Complaint_No;
                lblDivision.Text    = dsComplaint.Tables[0].Rows[0]["ProductDivision_Desc"].ToString();
                lblProduct.Text     = dsComplaint.Tables[0].Rows[0]["Product_Desc"].ToString();

                hdnDivSNo.Value  = dsComplaint.Tables[0].Rows[0]["ProductDivision_SNo"].ToString();
                hdnProdSNo.Value = dsComplaint.Tables[0].Rows[0]["Product_SNo"].ToString();
            }
            if (dsComplaint.Tables[1] != null)
            {
                if (dsComplaint.Tables[1].Rows.Count > 0)
                {
                    btnConfirm.Enabled = false;
                    lblMessage.Text    = "Advice has been alrady generated. Advice No : " + dsComplaint.Tables[1].Rows[0][0].ToString();
                    Adviceflag         = true;
                }
            }
            Fn_Create_Table();


            Fn_Add(Adviceflag); //bp 30 oct 12
            ViewState["DataTableSpareReqComplt"] = DTSpareReqComplt;
        }
        System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"]));
    }
Пример #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            objCommonMIS.EmpId            = Membership.GetUser().UserName.ToString();
            objCommonMIS.BusinessLine_Sno = "2";
            objCommonMIS.RegionSno        = "0";
            objCommonMIS.BranchSno        = "0";

            if (!Page.IsPostBack)
            {
                objASCSparePurchaseOutside.RegionSno = "0";
                objASCSparePurchaseOutside.UserName  = Membership.GetUser().UserName.ToString();
                objASCSparePurchaseOutside.GetUserRegions(ddlRegion);
                objASCSparePurchaseOutside.GetUserBranchs(ddlBranch);
                if (objCommonMIS.CheckLoogedInASC() > 0)
                {
                    objCommonMIS.GetSCs(ddlASC);
                    if (ddlASC.Items.Count == 2)
                    {
                        ddlASC.SelectedIndex = 1;
                    }
                }
                else
                {
                    objCommonMIS.GetUserSCs(ddlASC);
                    if (ddlASC.Items.Count == 2)
                    {
                        ddlASC.SelectedIndex = 1;
                    }
                    objASCSparePurchaseOutside.ASC_Id = 0;
                }
                objASCSparePurchaseOutside.ProductDivision_Id = 0;
                objASCSparePurchaseOutside.GetAllProductDivision(ddlProductDivison);

                ViewState["DataTableSparePurchaseOutside"] = null;
                objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString());
                // objASCSparePurchaseOutside.BindDDLDivision(ddlProdDivision, Convert.ToInt32(hdnASC_Code.Value));
                Fn_Create_Table();
                DTSparePurchaseOutside.Clear();
                DTSparePurchaseOutside.AcceptChanges();
                // ViewState["DataTableSparePurchaseOutside"] = DTSparePurchaseOutside;
            }
            System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"]));
        }
        catch (Exception ex)
        {
            SIMSCommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString());
        }
    }
Пример #8
0
 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"]));
 }
Пример #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString());
        hdnASC_Id.Value      = Convert.ToString(objCommonClass.ASC_Id);
        sqlParamSrh[3].Value = hdnASC_Id.Value;
        if (!Page.IsPostBack)
        {
            ViewState["Column"] = "SIMS_Indent_No";
            ViewState["Order"]  = "ASC";
            BindGrid();
            // 4 nov bp
            BindCancelledGrid(gvcancelled, lblcancount);
        }

        System.Threading.Thread.Sleep(Convert.ToInt32(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"]));
    }
Пример #10
0
 }// Added By Ashok Kumar on 27.10.2014 for checking complaint after specific date
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //Read Key value Added By Ashok on 27.10.2014
         var complaintDt = ConfigurationManager.AppSettings["ComplaintDate"];
         ComplaintDate = complaintDt == null ? 0 : Convert.ToInt32(complaintDt);
         //End
         string SC = Membership.GetUser().UserName.ToString();
         objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString());
         hdnASC_Id.Value                    = Convert.ToString(objCommonClass.ASC_Id);
         hdnUserType_Code.Value             = Convert.ToString(objCommonClass.UserType_Code);
         objspareconsumeforcomplaint.ASC_Id = Convert.ToInt32(hdnASC_Id.Value);
         //imgbtnSave.Attributes.Add("onclick", "return ValidateAdvices();");
         if (!string.IsNullOrEmpty(Request.QueryString["complaintno"]))
         {
             lblComplaintNo.Text = Convert.ToString(Request.QueryString["complaintno"]);
             Page.Items.Add("RequestType", Request.QueryString["RequestType"]); // 11 Apr 13
             GetComplaintDetailData();
             if (Convert.ToString(Request.QueryString["RequestType"]) == "Demo")
             {
                 GetActivityCharges();
                 trDemoCharges.Visible    = true;
                 trActivityHeader.Visible = false;
                 trAtivitySearch.Visible  = false;
             }
             else
             {
                 trDemoCharges.Visible    = false;
                 trActivityHeader.Visible = true;
                 trAtivitySearch.Visible  = true;
             }
         }
         else
         {
             imgbtnSave.Enabled = false;
         }
         //objspareconsumeforcomplaint.BindComplaint(ddlComplaintNo);
         //imgbtnCloseComplaint.Enabled = false;
     }
     //ADDEE BY ARUN:29/12/2010
     if (GridActivitySearch.Rows.Count == 0)
     {
         BtnAdd.Visible = false;
     }
 }
Пример #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            try
            {
                ddlASCName.Items.Insert(0, new ListItem("Select", "0"));
                ddlDivision.Items.Insert(0, new ListItem("Select", "0"));
                objRejectedClaim.BindASC(ddlASCName);
                objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString());
                hdnASC_Id.Value = Convert.ToString(objCommonClass.ASC_Id);
                lblASCName.Text = Convert.ToString(objCommonClass.ASC_Name).Trim();
                //lblASCName.Text = objCommonClass.ASC_Name.Trim();
                if (Convert.ToInt32(hdnASC_Id.Value) > 0)
                {
                    for (int i = 0; i < ddlASCName.Items.Count; i++)
                    {
                        if (ddlASCName.Items[i].Value == hdnASC_Id.Value)
                        {
                            ddlASCName.SelectedIndex = i;
                            ddlASCName.Enabled       = false;
                            break;
                        }
                    }
                }
                ddlASCName_SelectedIndexChanged(ddlASCName, null);
            }
            catch (Exception ex)
            {
                Response.Redirect("../../Pages/Default.aspx");
            }
            if (!string.IsNullOrEmpty(Request.QueryString["ReturnId"]))
            {
                string divindex = Convert.ToString(Session["DIV"]);
                ddlDivision.SelectedValue = divindex;
                ddlDivision_SelectedIndexChanged(null, null);
            }
        }


        System.Threading.Thread.Sleep(Convert.ToInt32(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"]));
    }
Пример #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     lblMessage.Text = "";
     if (!Page.IsPostBack)
     {
         ViewState["DataTableSpareSalePurchaseByASC"] = null;
         objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString());
         lblASCName.Text   = objCommonClass.ASC_Name;
         hdnASC_Code.Value = Convert.ToString(objCommonClass.ASC_Id);
         objSpareSalePurchaseByASC.BindDDLDivision(ddlProdDivision, Convert.ToInt32(hdnASC_Code.Value));
         objSpareSalePurchaseByASC.BindDDLMovType(ddlMovType);
         ddlVendor.Items.Insert(0, new ListItem("Select", "0"));
         Fn_Create_Table();
         DTSpareSalePurchaseByASC.Clear();
         DTSpareSalePurchaseByASC.AcceptChanges();
         ViewState["DataTableSpareSalePurchaseByASC"] = DTSpareSalePurchaseByASC;
     }
     objSpareSalePurchaseByASC.Asc_Code = Convert.ToInt32(hdnASC_Code.Value);
     System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"]));
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString());
         lblASCName.Text   = objCommonClass.ASC_Name;
         hdnASC_Code.Value = Convert.ToString(objCommonClass.ASC_Id);
         //lblStockTransferDocumentNo.Text = objSpareStockTransferASC.GET_UNIQUE_KEY_VALUE(hdnASC_Code.Value);
         //objSpareStockTransferASC.BindTOLocation(ddlToLocation, hdnASC_Code.Value);
         //objSpareStockTransferASC.BindASCCode(ddlASCCode);
         objSpareStockTransferASC.BindProductDivision(ddlProductDivision, hdnASC_Code.Value);
         ddlSpare.Items.Insert(0, new ListItem("Select", "Select"));
         ddlFromLocation.Items.Insert(0, new ListItem("Select", "Select"));
         ddlToLocation.Items.Insert(0, new ListItem("Select", "Select"));
         lbldate.Text        = DateTime.Today.ToString();
         ViewState["Column"] = "SC_Name";
         ViewState["Order"]  = "ASC";
     }
     System.Threading.Thread.Sleep(int.Parse(ConfigurationManager.AppSettings["AjaxPleaseWaitTime"]));
 }
Пример #14
0
    protected void Page_Load(object sender, EventArgs e)

    {
        try
        {
            if (!IsPostBack)
            {
                // added 4 nov bhawesh
                objcommon.SelectASC_Name_Code(Membership.GetUser().UserName.ToString());
                hdnASC_Id.Value = Convert.ToString(objcommon.ASC_Id);

                objdefspare.ASC = Membership.GetUser().UserName.ToString();
                objdefspare.BindASC();
                lblASCName.Text = objdefspare.ASC;
                objdefspare.ASC = Membership.GetUser().UserName.ToString();
                objdefspare.BindDivision(ddlDivision);
                if (!string.IsNullOrEmpty(Request.QueryString["ReturnId"]))
                {
                    string divindex = Convert.ToString(Session["div"]);
                    ddlDivision.SelectedValue = divindex;
                    ddlDivision_SelectedIndexChanged(null, null);
                    Session["div"] = ddlDivision.SelectedValue;
                }
                else
                {
                    //objdefspare.ASC = ddlasc.SelectedValue;
                    //objdefspare.ProductDiv = ddlDivision.SelectedValue;
                    //objdefspare.BindComplaintData(gvChallanDetail);
                    ddlDivision_SelectedIndexChanged(null, null);
                }
                //added 4 nov bp
                objdefspare.BindGeneratedChallans(ddlChallans, hdnASC_Id.Value, "0");
            }
        }
        catch (Exception ex)
        {
            SIMSCommonClass.WriteErrorErrFile(Request.RawUrl.ToString(), ex.StackTrace.ToString() + "-->" + ex.Message.ToString());
        }
    }
Пример #15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string SC = Membership.GetUser().UserName.ToString();
         objCommonClass.SelectASC_Name_Code(Membership.GetUser().UserName.ToString());
         hdnASC_Id.Value = Convert.ToString(objCommonClass.ASC_Id);
         objspareconsumeforcomplaint.ASC_Id = Convert.ToInt32(hdnASC_Id.Value);
         if (!string.IsNullOrEmpty(Request.QueryString["complaintno"]))
         {
             lblComplaintNo.Text = Convert.ToString(Request.QueryString["complaintno"]);
             GetComplaintDetailData();
         }
         else
         {
             imgbtnSave.Enabled = false;
         }
     }
     if (GridActivitySearch.Rows.Count == 0)
     {
         BtnAdd.Visible = false;
     }
 }
Пример #16
0
 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"]));
 }
    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 = "";
    }