Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SessionValues svalue = new SessionValues();

            //  base.UsessionValue = svalue.FetchUsersAndComp(string.IsNullOrEmpty(Convert.ToString(Session["Visageuseridno"])) ? 0 : Convert.ToInt32(Session["Visageuseridno"]));
            if (Request.UrlReferrer == null)
            {
                base.AutoRedirect();
            }
            if (!Page.IsPostBack)
            {
                if (base.CheckUserRights(intFormId) == false)
                {
                    Response.Redirect("PermissionDenied.aspx");
                }
                if (base.ADD == false)
                {
                    lnkBtnSave.Visible = false;
                }
                if (base.View == false)
                {
                    lblViewList.Visible = false;
                }
                txtDate.Attributes.Add("onkeypress", "return notAllowAnything(event);");
                txtDate.Text = System.DateTime.Now.ToString("dd-MM-yyyy");
                this.BindDateRange();
                ddlDateRange.SelectedValue = Convert.ToString(base.UserDateRng);
                ddlDateRange.SelectedIndex = 0;
                ddlDateRange_SelectedIndexChanged(null, null);
                if (Convert.ToString(Session["Userclass"]) == "Admin")
                {
                    this.BidFromCity();
                }
                else
                {
                    this.BindCity(Convert.ToInt64(Session["UserIdno"]));
                }

                ChallanDelverdDAL objChallanDelverdDAL = new ChallanDelverdDAL();
                tblUserPref       obj = objChallanDelverdDAL.selectUserPref();
                ddlToCity.SelectedValue = Convert.ToString(base.UserFromCity);
                BindChlnNo();
                ViewState["dt"] = null;
                if (Request.QueryString["chlnrcptidno"] != null)
                {
                    lnkSubmit.Visible = false; ddlChallanDetl.Enabled = false; DivRcptNo.Visible = true; txtRcptNo.Visible = true; ddlToCity.Enabled = false;

                    this.Populate(Convert.ToInt32(Request.QueryString["chlnrcptidno"]));
                    this.Title        = "Edit Delivery Challan";
                    lnkBtnNew.Visible = true;
                }
                else
                {
                    lnkSubmit.Visible = true; ddlChallanDetl.Enabled = true; txtRcptNo.Visible = false; DivRcptNo.Visible = false; lblRcptDtNo.Text = "Receipt Date"; ddlToCity.Enabled = true;
                    lnkBtnNew.Visible = false;
                }
                ddlDateRange.Focus();
            }
            svalue = null;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.UrlReferrer == null)
            {
                base.AutoRedirect();
            }
            SessionValues svalue = new SessionValues();

            //  base.UsessionValue = svalue.FetchUsersAndComp(string.IsNullOrEmpty(Convert.ToString(Session["Visageuseridno"])) ? 0 : Convert.ToInt32(Session["Visageuseridno"]));
            // conString = ConfigurationManager.ConnectionStrings["VisageConnectionString"].ToString();
            svalue = null;
            if (!Page.IsPostBack)
            {
                this.Title = "Manage Delivery Register";
                this.BindDateRange();
                ddlDateRange.SelectedIndex = 0;
                ddlDateRange_SelectedIndexChanged(null, null);
                this.BidFromCity();
                ChallanDelverdDAL objChallanDelverdDAL = new ChallanDelverdDAL();
                tblUserPref       obj = objChallanDelverdDAL.selectUserPref();
                ddlTocity.SelectedValue = Convert.ToString(obj.BaseCity_Idno);
                txtDateFrom.Attributes.Add("onkeypress", "return notAllowAnything(event);");
                txtDateTo.Attributes.Add("onkeypress", "return notAllowAnything(event);");
                this.Countall();
                ddlDateRange.Focus();
            }
        }
Esempio n. 3
0
        private void ClearControls()
        {
            lnkBtnNew.Visible         = false;
            txtGrno.Text              = "";
            ddlLocation.SelectedValue = "0";
            grdMain.Visible           = false;
            hidMtrlRcptid.Value       = hidMtrlTrnsfDt.Value = string.Empty;
            lnkSubmit.Visible         = true; ddlLocation.Enabled = true;
            ChallanDelverdDAL objChallanDelverdDAL = new ChallanDelverdDAL();
            tblUserPref       obj = objChallanDelverdDAL.selectUserPref();

            ddlLocation.SelectedValue = Convert.ToString(obj.BaseCity_Idno);
        }
Esempio n. 4
0
        private void ClearControls()
        {
            lnkBtnNew.Visible = false;
            txtLocGrAmnt.Text = "";
            txtoutGrAmnt.Text = "";
            txtNetAmnt.Text   = "";

            ddlToCity.SelectedIndex      = 0;
            ddlChallanDetl.SelectedValue = "0";
            txtRcptNo.Text      = string.Empty;
            hidMtrlRcptid.Value = hidMtrlTrnsfDt.Value = string.Empty;
            grdMain.DataSource  = null;
            grdMain.DataBind();
            ddlToCity.Enabled      = true;
            ddlChallanDetl.Enabled = true;
            lnkSubmit.Visible      = true; ddlChallanDetl.Enabled = true; txtRcptNo.Visible = false; DivRcptNo.Visible = false; lblRcptDtNo.Text = "Receipt Date"; ddlToCity.Enabled = true;
            ChallanDelverdDAL objChallanDelverdDAL = new ChallanDelverdDAL();
            tblUserPref       obj = objChallanDelverdDAL.selectUserPref();

            ddlToCity.SelectedValue = Convert.ToString(obj.BaseCity_Idno);
        }