protected void Btndelete_Click(object sender, EventArgs e)
    {
        if (con.State == ConnectionState.Closed)
        {
            con.Open();
        }

        int    count    = 0;
        string ZoneCode = ddlzonename.SelectedValue;

        foreach (GridViewRow row in GridView1.Rows)
        {
            CheckBox chk = null;
            chk = (CheckBox)row.FindControl("chkDelete");
            if (chk.Checked == true)
            {
                //string godown = chk.Text.Trim().ToString();

                string mmzonecode = row.Cells[1].Text;

                string mzone = row.Cells[2].Text;

                string tenderrate     = row.Cells[3].Text;
                string mfinancialyear = row.Cells[4].Text;



                string     delLogqry = "Insert into tblZoneMasterNew_Log select * from tblZoneMasterNew where ZoneCode='" + mmzonecode + "'and Tender_Rate='" + tenderrate + "'";
                SqlCommand delcmd    = new SqlCommand(delLogqry, con);
                int        log       = delcmd.ExecuteNonQuery();


                string     query = "delete  from tblZoneMasterNew where ZoneCode='" + mmzonecode + "'and Tender_Rate='" + tenderrate + "'";
                SqlCommand cmd   = new SqlCommand(query, con);
                int        req   = cmd.ExecuteNonQuery();



                count = count + 1;
            }
            fillgirdforTenderRate();

            if (count == 0)
            {
                Page.RegisterClientScriptBlock("mymsg2", "<script language=javascript> alert('Please click on check box before delete'); </script> ");
            }

            else
            {
                Page.RegisterClientScriptBlock("mymsg2", "<script language=javascript> alert('Deleted Sucessfully'); </script> ");
            }
        }


        if (con.State == ConnectionState.Open)
        {
            con.Close();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["issue_id"] != null)
        {
            version = Session["hindi"].ToString();

            distid  = Session["dist_id"].ToString();
            issueid = Session["issue_id"].ToString();
            ComObj  = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());

            txtcapacty.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");


            txtcapacty.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtcapacty.Attributes.Add("onchange", "return chksqltxt(this)");

            txtgname.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtgname.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtgname.Attributes.Add("onchange", "return chksqltxt(this)");


            txtcapacty.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
            txtgname.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
            chk = new chksql();
            ArrayList ctrllist = new ArrayList();
            ctrllist.Add(txtcapacty.Text);
            ctrllist.Add(txtgname.Text);
            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }
            if (Page.IsPostBack == false)
            {
                Fillgrid();
                if (version == "H")
                {
                    lblGodownNo.Text     = Resources.LocalizedText.lblGodownNo;
                    lblMaxCap.Text       = Resources.LocalizedText.lblMaxCap;
                    lblGodownMaster.Text = Resources.LocalizedText.lblGodownMaster;
                    btnaddnew.Text       = Resources.LocalizedText.btnaddnew;
                    btnclose.Text        = Resources.LocalizedText.btnclose;
                    btnsubmit.Text       = Resources.LocalizedText.btnsubmit;
                    btnupdate.Text       = Resources.LocalizedText.btnupdate;
                }
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }
Beispiel #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["dist_id"] != null)
        {
            distid = Session["dist_id"].ToString();

            //txtrackno.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");

            //txtrackno.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            //txtrackno.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            //txtrackno.Attributes.Add("onchange", "return chksqltxt(this)");
            DaintyDate3.Attributes.Add("onkeypress", "return CheckCalDate(this)");
            DaintyDate3.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            DaintyDate3.Attributes.Add("onchange", "return chksqltxt(this)");

            //txtrackno.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();

            chk = new chksql();

            ComObj = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());
            ArrayList ctrllist = new ArrayList();
            //ctrllist.Add(txtrackno.Text);
            ctrllist.Add(DaintyDate3.Text);
            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }

            if (!IsPostBack)
            {
                DaintyDate3.Text = DateTime.Today.Date.ToString("dd-MM-yyyy");
                GetName();
                fillgrid();
                GetCommodity();
                GetDist();
                GetRailHead();
                getstates();
                GetDispatchType();
                get_scheme();
                //GetRackAllert();
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["issue_id"] != null)
        {
            sid = Session["issue_id"].ToString();
            //string dbname = "Warehouse";
            ComObj = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());
            //mobj = new MoveChallan(ComObj);
            //string qry = "SELECT GatePass_idFROM dbo.tbl_Receipt_Details where Depot_Id='"+ sid +"'";
            //DataSet ds = mobj.selectAny(qry);
            // GridView1.DataSource = ds.Tables[0];
            // GridView1.DataBind();
            DaintyDate1.Attributes.Add("onkeypress", "return CheckCalDate(this)");
            DaintyDate1.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            DaintyDate1.Attributes.Add("onchange", "return chksqltxt(this)");

            DaintyDate2.Attributes.Add("onkeypress", "return CheckCalDate(this)");
            DaintyDate2.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            DaintyDate2.Attributes.Add("onchange", "return chksqltxt(this)");


            chk = new chksql();
            ArrayList ctrllist = new ArrayList();
            ctrllist.Add(DaintyDate1.Text);
            ctrllist.Add(DaintyDate2.Text);

            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }



            if (!IsPostBack)
            {
                //fillgrid();
                GetSource();
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }
Beispiel #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Session["st_id"] == null)
            {
                Response.Redirect("~/MainLogin.aspx");
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
        distid = Session["st_id"].ToString();
        if (Page.IsPostBack == false)
        {
            ddd_allot_year.Items.Add((int.Parse(DateTime.Today.Year.ToString()) - 1).ToString());
            ddd_allot_year.Items.Add(DateTime.Today.Year.ToString());
            ddd_allot_year.Items.Add((int.Parse(DateTime.Today.Year.ToString()) + 1).ToString());
            ddd_allot_year.SelectedIndex = 1;
            //ddl_allot_month.SelectedIndex = DateTime.Today.Month - 1;
            get_comm();
            get_scheme();
            getDistrict();
        }
        TextBox1.Attributes.Add("onkeypress", "return CheckIsNumeric(this);");


        TextBox1.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        TextBox1.Attributes.Add("onchange", "return chksqltxt(this)");
        TextBox1.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
        chk = new chksql();
        ArrayList ctrllist = new ArrayList();

        ctrllist.Add(TextBox1.Text);
        if (chk == null)
        {
        }
        else
        {
            bool chkstr = chk.chksql_server(ctrllist);
            if (chkstr == true)
            {
                Page.Server.Transfer(HttpContext.Current.Request.Path);
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["st_id"] != null)
        {
            stid = Session["st_id"].ToString();

            ComObj = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());
            txtplace.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtplace.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtplace.Attributes.Add("onchange", "return chksqltxt(this)");

            txtplacename.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtplacename.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtplacename.Attributes.Add("onchange", "return chksqltxt(this)");

            chk = new chksql();
            ArrayList ctrllist = new ArrayList();
            ctrllist.Add(txtplace.Text);
            ctrllist.Add(txtplacename.Text);
            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }

            if (Page.IsPostBack == false)
            {
                // fillgrid();
                GetState();
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["issue_id"] != null)
        {
            sid     = Session["issue_id"].ToString();
            distid  = Session["dist_id"].ToString();
            version = Session["hindi"].ToString();


            ComObj = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());


            txtrecdbaf.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtrecdqty.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtdisbag.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtdisqty.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");

            txtrecdbaf.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtrecdbaf.Attributes.Add("onchange", "return chksqltxt(this)");

            txtrecdqty.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtrecdqty.Attributes.Add("onchange", "return chksqltxt(this)");

            txtdisbag.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtdisbag.Attributes.Add("onchange", "return chksqltxt(this)");

            txtdisqty.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtdisqty.Attributes.Add("onchange", "return chksqltxt(this)");

            chk = new chksql();
            ArrayList ctrllist = new ArrayList();
            ctrllist.Add(txtrecdbaf.Text);
            ctrllist.Add(txtrecdqty.Text);
            ctrllist.Add(txtdisbag.Text);
            ctrllist.Add(txtdisqty.Text);
            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }

            txtrackno.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
            txtchallan.Style["TEXT-ALIGN"]  = TextAlign.Right.ToString();
            txtrecdbaf.Style["TEXT-ALIGN"]  = TextAlign.Right.ToString();
            txtrecdqty.Style["TEXT-ALIGN"]  = TextAlign.Right.ToString();
            txtdisbag.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
            txtdisqty.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
            DaintyDate3.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
            txtdisbag.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
            txtdisqty.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
            txtchalldt.Style["TEXT-ALIGN"]  = TextAlign.Right.ToString();
            txttruckno.Style["TEXT-ALIGN"]  = TextAlign.Right.ToString();
            txtmaxcap.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
            txtcurntcap.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
            txtavalcap.Style["TEXT-ALIGN"]  = TextAlign.Right.ToString();
            if (!IsPostBack)
            {
                DaintyDate3.Text = DateTime.Today.Date.ToString("dd/MM/yyyy");
                GetRailHead();
                GetChallan();
                GetRack();
                GetTransport();
                GetGodown();
                GetCommodity();
                GetScheme();
                if (version == "H")
                {
                    lblCommodity.Text = Resources.LocalizedText.lblCommodity;
                    lblGodownNo.Text  = Resources.LocalizedText.lblGodownNo;
                    lblScheme.Text    = Resources.LocalizedText.lblScheme;

                    lblGodownNo.Text              = Resources.LocalizedText.lblGodownNo;
                    lbltotalReceivedBags.Text     = Resources.LocalizedText.lbltotalReceivedBags;
                    lblTotalQuantityReceived.Text = Resources.LocalizedText.lblTotalQuantityReceived;
                    lblMaxCap.Text        = Resources.LocalizedText.lblCapacity;
                    lblChallanNumber.Text = Resources.LocalizedText.lblChallanNumber;
                    lblTrans.Text         = Resources.LocalizedText.lblTrans;
                    lblTruckNumber.Text   = Resources.LocalizedText.lblTruckNumber;
                    lblrailhead.Text      = Resources.LocalizedText.lblrailhead;
                    lblchallandate.Text   = Resources.LocalizedText.lblchallandate;

                    lblCurStackCap.Text    = Resources.LocalizedText.lblCurStackCap;
                    lblAvailable.Text      = Resources.LocalizedText.lblAvailable;
                    lblIssuedBags.Text     = Resources.LocalizedText.lblIssuedBags;
                    lblDispatchQty.Text    = Resources.LocalizedText.lblDispatchQty;
                    btnclose.Text          = Resources.LocalizedText.btnclose;
                    btnsubmit.Text         = Resources.LocalizedText.btnsubmit;
                    lbldepositstock.Text   = Resources.LocalizedText.lbldepositstock;
                    lblrackno1.Text        = Resources.LocalizedText.lblrackno1;
                    lblrackno.Text         = Resources.LocalizedText.lblrackno;
                    lblChallanNumber1.Text = Resources.LocalizedText.lblChallanNumber1;
                }
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }
Beispiel #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["st_id"] != null)
        {
            stid = Session["st_id"].ToString();



            ComObj = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());

            txtrrqty.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtwcount.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");


            txtrrqty.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtrrqty.Attributes.Add("onchange", "return chksqltxt(this)");


            txtwcount.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtwcount.Attributes.Add("onchange", "return chksqltxt(this)");

            txtrrno.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtrrno.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtrrno.Attributes.Add("onchange", "return chksqltxt(this)");



            txtrrqty.Style["TEXT-ALIGN"]  = TextAlign.Right.ToString();
            txtwcount.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
            txtrrno.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
            chk = new chksql();
            ArrayList ctrllist = new ArrayList();
            ctrllist.Add(txtrrqty.Text);
            ctrllist.Add(txtwcount.Text);
            ctrllist.Add(txtrrno.Text);
            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }

            if (!IsPostBack)
            {
                GetSourceDist();
                //GetRack();
                dt.Columns.Add("district_code");
                dt.Columns.Add("Rack_No");
                dt.Columns.Add("RR_No");
                dt.Columns.Add("RR_qty");
                dt.Columns.Add("Wagon_Count");

                Session["dt"] = dt;
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["dist_id"] != null)
        {
            distid = Session["dist_id"].ToString();

            //txttorderno.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this)");
            txtroqty.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this),checksqlkey_gen(event,this)");
            txtsendqty.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this)");
            txtcumlqty.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this)");
            txtbalqty.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this)");



            txttorderno.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txttorderno.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txttorderno.Attributes.Add("onchange", "return chksqltxt_psw(this)");

            //txtsendqty.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtsendqty.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtsendqty.Attributes.Add("onchange", "return chksqltxt_psw(this)");



            txttorderno.Style["TEXT-ALIGN"]  = TextAlign.Right.ToString();
            txtroqty.Style["TEXT-ALIGN"]     = TextAlign.Right.ToString();
            txtsendqty.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
            txtcumlqty.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
            txtbalqty.Style["TEXT-ALIGN"]    = TextAlign.Right.ToString();
            txtcommodity.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
            txtscheme.Style["TEXT-ALIGN"]    = TextAlign.Right.ToString();
            txtrodate.Style["TEXT-ALIGN"]    = TextAlign.Right.ToString();
            txtliftqty.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
            chk = new chksql();

            ArrayList ctrllist = new ArrayList();
            ctrllist.Add(txttorderno.Text);
            ctrllist.Add(txtsendqty.Text);

            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }

            ComObj = new Common(ConfigurationSettings.AppSettings["ConnectionString"].ToString());

            if (!IsPostBack)
            {
                DaintyDate1.Text = DateTime.Today.Date.ToString("dd-MM-yyyy");
                //GetTransportAll();
                GetTransport();
                GetDistance();
                //GetRO();
                GetName();
                GetDist();
                GetFCIdist();
                dt.Columns.Add("RO_No");
                dt.Columns.Add("TO_No");
                dt.Columns.Add("Quantity");
                dt.Columns.Add("DisName");
                dt.Columns.Add("IssueName");
                dt.Columns.Add("District");
                dt.Columns.Add("IssueCenter");
                ddldistrict.SelectedValue = distid;
                GetDCName();
                Session["dt"] = dt;
                ddd_allot_year.Items.Add((int.Parse(DateTime.Today.Year.ToString()) - 1).ToString());
                ddd_allot_year.Items.Add(DateTime.Today.Year.ToString());
                ddd_allot_year.SelectedIndex  = 1;
                ddl_allot_month.SelectedIndex = DateTime.Today.Month - 1;
                GetRO();
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }
Beispiel #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ComObj = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());

        if (Session["dist_id"] != null)
        {
            distid = Session["dist_id"].ToString();

            txtmsprate.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtincidental.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtbonus.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtgunnycap.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");



            txtmsprate.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtmsprate.Attributes.Add("onchange", "return chksqltxt(this)");

            txtincidental.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtincidental.Attributes.Add("onchange", "return chksqltxt(this)");

            txtbonus.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtbonus.Attributes.Add("onchange", "return chksqltxt(this)");

            txtgunnycap.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtgunnycap.Attributes.Add("onchange", "return chksqltxt(this)");

            effective_from.Attributes.Add("onkeypress", "return CheckCalDate(this)");
            effective_from.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            effective_from.Attributes.Add("onchange", "return chksqltxt(this)");



            txtmsprate.Style["TEXT-ALIGN"]    = TextAlign.Right.ToString();
            txtincidental.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
            txtbonus.Style["TEXT-ALIGN"]      = TextAlign.Right.ToString();
            txtgunnycap.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
            chk = new chksql();
            ArrayList ctrllist = new ArrayList();
            ctrllist.Add(txtmsprate.Text);
            ctrllist.Add(txtincidental.Text);
            ctrllist.Add(txtbonus.Text);
            ctrllist.Add(txtgunnycap.Text);
            ctrllist.Add(effective_from.Text);
            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }



            if (!IsPostBack)
            {
                effective_from.Text = DateTime.Today.Date.ToString("dd-MM-yyyy");

                GetScheme();
                GetCommodity();
                GetSeason();
                GetSource();
                GetSchemeFCI();

                int myear = int.Parse(DateTime.Now.Year.ToString());
                ddlcropyear.Items.Add("Crop Year Not Indicated");
                ddlcropyear.Items.Add(DateTime.Now.Year + "-" + (int.Parse(DateTime.Now.Year.ToString()) + 1).ToString());
                ddlcropyear.Items.Add(DateTime.Now.Year - 1 + "-" + DateTime.Now.Year);
                ddlcropyear.Items.Add((int.Parse(DateTime.Now.Year.ToString()) - 2).ToString() + "-" + (int.Parse(DateTime.Now.Year.ToString()) - 1).ToString());
                ddlcropyear.Items.Add((int.Parse(DateTime.Now.Year.ToString()) - 3).ToString() + "-" + (int.Parse(DateTime.Now.Year.ToString()) - 2).ToString());
                ddlcropyear.Items.Add((int.Parse(DateTime.Now.Year.ToString()) - 4).ToString() + "-" + (int.Parse(DateTime.Now.Year.ToString()) - 3).ToString());
                ddlcropyear.Items.Add((int.Parse(DateTime.Now.Year.ToString()) - 5).ToString() + "-" + (int.Parse(DateTime.Now.Year.ToString()) - 4).ToString());
                ddlcropyear.Items.Add((int.Parse(DateTime.Now.Year.ToString()) - 6).ToString() + "-" + (int.Parse(DateTime.Now.Year.ToString()) - 5).ToString());
                ddlcropyear.Items.Add((int.Parse(DateTime.Now.Year.ToString()) - 7).ToString() + "-" + (int.Parse(DateTime.Now.Year.ToString()) - 6).ToString());
                ddlcropyear.Items.Add((int.Parse(DateTime.Now.Year.ToString()) - 8).ToString() + "-" + (int.Parse(DateTime.Now.Year.ToString()) - 7).ToString());
                ddlcropyear.Items.Add((int.Parse(DateTime.Now.Year.ToString()) - 9).ToString() + "-" + (int.Parse(DateTime.Now.Year.ToString()) - 8).ToString());
                ddlcropyear.Items.Add((int.Parse(DateTime.Now.Year.ToString()) - 10).ToString() + "-" + (int.Parse(DateTime.Now.Year.ToString()) - 9).ToString());
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Session["dist_id"] == null)
            {
                Response.Redirect("~/Session_Expire_Dist.aspx");
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }


        distid = Session["dist_id"].ToString();
        sid    = Session["issue_id"].ToString();



        if (!IsPostBack)
        {
            tx_dd_date.Text = DateTime.Today.Date.Date.ToString("dd/MM/yyyy");



            ddd_allot_year.Items.Add((int.Parse(DateTime.Today.Year.ToString()) - 1).ToString());
            ddd_allot_year.Items.Add(DateTime.Today.Year.ToString());
            ddd_allot_year.Items.Add((int.Parse(DateTime.Today.Year.ToString()) + 1).ToString());
            ddd_allot_year.SelectedIndex = 1;


            GetBank();

            Get_LinkCooperative();

            get_fps_Cash();

            ddl_allot_month.SelectedIndex = DateTime.Today.Month - 1;
        }

        tx_dd_date.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");

        tx_dd_amount.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");

        // hlinkpdo.Attributes.Add("onclick", "window.open('Print_DoorStep_DO.aspx',null,'left=400, top=100, height=900, width= 700, status=n o, resizable= no, scrollbars= no, toolbar= no,location= no, menubar= no');");

        chk = new chksql();
        ArrayList ctrllist = new ArrayList();


        if (chk == null)
        {
        }
        else
        {
            bool chkstr = chk.chksql_server(ctrllist);
            if (chkstr == true)
            {
                Page.Server.Transfer(HttpContext.Current.Request.Path);
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["dist_id"] != null)
        {
            distid  = Session["dist_id"].ToString();
            Ro_No   = Session["RO_No"].ToString();
            challan = Session["Challan"].ToString();
            TO_No   = Session["TO_No"].ToString();
            TransID = Session["Trans"].ToString();
            IC_No   = Session["TIC"].ToString();


            txtqtysend.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtnobags.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");

            txtqtysend.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtqtysend.Attributes.Add("onchange", "return chksqltxt(this)");

            //txtsendqty.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtnobags.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtnobags.Attributes.Add("onchange", "return chksqltxt(this)");

            txtchallan.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtchallan.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtchallan.Attributes.Add("onchange", "return chksqltxt(this)");

            txtvehno.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtvehno.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtvehno.Attributes.Add("onchange", "return chksqltxt(this)");


            txtmoisture.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtmoisture.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtmoisture.Attributes.Add("onchange", "return chksqltxt(this)");

            challandate.Attributes.Add("onkeypress", "return CheckCalDate(this)");
            challandate.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            challandate.Attributes.Add("onchange", "return chksqltxt(this)");



            //string dbname = "Warehouse";
            ComObj = new Common(ConfigurationSettings.AppSettings["ConnectionString"].ToString());
            chk    = new chksql();
            ArrayList ctrllist = new ArrayList();
            ctrllist.Add(txtqtysend.Text);
            ctrllist.Add(txtnobags.Text);
            ctrllist.Add(txtchallan.Text);
            ctrllist.Add(txtvehno.Text);
            ctrllist.Add(challandate.Text);

            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }
            if (Session["dc_id"] != null)
            {
                //Session.Abandon();
                //Session.RemoveAll();
            }


            if (!IsPostBack)
            {
                //GetRO();
                Transport();
                GetGunny();
                GetDist();
                GetCategory();
                GetData();
                GetFCIdist();
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Session["dist_id"] == null)
            {
                Response.Redirect("~/Session_Expire_Dist.aspx");
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
        ComObj  = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());
        distid  = Session["dist_id"].ToString();
        version = Session["hindi"].ToString();
        //sid = Session["issue_id"].ToString();
        save.Enabled = true;
        chk          = new chksql();
        ArrayList ctrllist = new ArrayList();

        ctrllist.Add(tx_do_no.Text);
        ctrllist.Add(TextBox1.Text);
        ctrllist.Add(tx_qty.Text);
        ctrllist.Add(tx_dd_no.Text);
        ctrllist.Add(tx_dd_amount.Text);

        if (chk == null)
        {
        }
        else
        {
            bool chkstr = chk.chksql_server(ctrllist);
            if (chkstr == true)
            {
                Page.Server.Transfer(HttpContext.Current.Request.Path);
            }
        }



        if (Page.IsPostBack == false)
        {
            tx_dd_date.Text     = DateTime.Today.Date.ToString("dd-MM-yyyy");
            tx_do_validity.Text = DateTime.Today.Date.ToString("dd-MM-yyyy");
            tx_do_date.Text     = DateTime.Today.Date.ToString("dd-MM-yyyy");


            ddd_allot_year.Items.Add((int.Parse(DateTime.Today.Year.ToString()) - 1).ToString());
            ddd_allot_year.Items.Add(DateTime.Today.Year.ToString());
            ddd_allot_year.Items.Add((int.Parse(DateTime.Today.Year.ToString()) + 1).ToString());
            ddd_allot_year.SelectedIndex = 1;
            get_comm();
            get_scheme();
            get_bankname();
            //GetRO();
            ddl_allot_month.SelectedIndex = DateTime.Today.Month - 1;

            if (version == "H")
            {
                lbl_lead.Text      = Resources.LocalizedText.lbl_lead;
                lblallotyear.Text  = Resources.LocalizedText.lblallotyear;
                lblallotmonth.Text = Resources.LocalizedText.lblallotmonth;
                lblCommodity.Text  = Resources.LocalizedText.lblCommodity;
                lblScheme.Text     = Resources.LocalizedText.lblScheme;

                lblratetype.Text   = Resources.LocalizedText.lblratetype;
                lbltoissue.Text    = Resources.LocalizedText.lbltoissue;
                lbldono.Text       = Resources.LocalizedText.lbldono;
                lbldodate.Text     = Resources.LocalizedText.lbldodate;
                lbldovalidity.Text = Resources.LocalizedText.lbldovalidity;

                lbl_balqty.Text = Resources.LocalizedText.lbl_balqty;

                lblQuantity.Text = Resources.LocalizedText.lblQuantity;
                lblqty.Text      = Resources.LocalizedText.lblqty;

                lblRateQuintal.Text = Resources.LocalizedText.lblRateQuintal;
                lblPaymentMode.Text = Resources.LocalizedText.lblPaymentMode;
                lblddchekno.Text    = Resources.LocalizedText.lblddchekno;
                lblddchekdate.Text  = Resources.LocalizedText.lblddchekdate;
                lblBankName.Text    = Resources.LocalizedText.lblBankName;
                lblamount.Text      = Resources.LocalizedText.lblamount;
                lbltotamt.Text      = Resources.LocalizedText.lbltotamt;
                btn_new.Text        = Resources.LocalizedText.btn_new;
                save.Text           = Resources.LocalizedText.btnsave;
                btnClose.Text       = Resources.LocalizedText.btnclose;
            }
        }

        //tx_do_no.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");
        //tx_do_validity.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");
        //tx_permit_validity.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");
        tx_qty.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");
        tx_dd_amount.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");
        tx_rate_qt.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");
        tx_dd_amount.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");
        tx_do_no.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
        tx_do_no.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_do_no.Attributes.Add("onchange", "return chksqltxt(this)");

        TextBox1.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
        TextBox1.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        TextBox1.Attributes.Add("onchange", "return chksqltxt(this)");

        tx_qty.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
        tx_qty.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_qty.Attributes.Add("onchange", "return chksqltxt(this)");

        tx_dd_no.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
        tx_dd_no.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_dd_no.Attributes.Add("onchange", "return chksqltxt(this)");


        tx_dd_amount.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
        tx_dd_amount.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_dd_amount.Attributes.Add("onchange", "return chksqltxt(this)");



        //hlinkpdo.Attributes.Add("onclick", "window.open('print_DeleveryOrder.aspx',null,'left=300, top=90, height=800, width= 650, status=n o, resizable= no, scrollbars= no, toolbar= no,location= no, menubar= no');");
        txtcomdty_bal.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
        tx_do_no.Style["TEXT-ALIGN"]      = TextAlign.Right.ToString();
        //tx_do_validity.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
        tx_qty.Style["TEXT-ALIGN"]       = TextAlign.Right.ToString();
        tx_rate_qt.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
        tx_tot_amt.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
        tx_dd_no.Style["TEXT-ALIGN"]     = TextAlign.Right.ToString();
        tx_dd_amount.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();

        tx_do_date.Attributes.Add("onkeypress", "return CheckCalDate(this)");
        tx_do_validity.Attributes.Add("onkeypress", "return CheckCalDate(this)");
        tx_dd_date.Attributes.Add("onkeypress", "return CheckCalDate(this)");


        tx_do_date.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_do_date.Attributes.Add("onchange", "return chksqltxt(this)");

        tx_do_validity.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_do_validity.Attributes.Add("onchange", "return chksqltxt(this)");

        tx_dd_date.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_dd_date.Attributes.Add("onchange", "return chksqltxt(this)");
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["dist_id"] != null)
        {
            distid  = Session["dist_id"].ToString();
            version = Session["hindi"].ToString();

            txtroqty.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this)");
            txtrate.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this)");
            txtamount.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this)");
            txtchqamt.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this)");



            txtrodate.Attributes.Add("onkeypress", "return CheckCalDate(this)");
            txtrovalidity.Attributes.Add("onkeypress", "return CheckCalDate(this)");
            txtddate.Attributes.Add("onkeypress", "return CheckCalDate(this)");

            txtroqty.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtroqty.Attributes.Add("onchange", "return chksqltxt(this),calcAmount();");

            txtrodate.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtrodate.Attributes.Add("onchange", "return chksqltxt(this)");

            txtrovalidity.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtrovalidity.Attributes.Add("onchange", "return chksqltxt(this)");

            txtddate.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtddate.Attributes.Add("onchange", "return chksqltxt(this)");

            txtrono.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtrono.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtrono.Attributes.Add("onchange", "return chksqltxt(this)");

            txtrate.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtrate.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtrate.Attributes.Add("onchange", "return chksqltxt(this)");

            txtckeckno.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtckeckno.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtckeckno.Attributes.Add("onchange", "return chksqltxt(this)");

            txtchqamt.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtchqamt.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtchqamt.Attributes.Add("onchange", "return chksqltxt(this)");
            txtchqamt.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this)");

            txtremark.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtremark.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtremark.Attributes.Add("onchange", "return chksqltxt(this)");


            txtrono.Style["TEXT-ALIGN"]    = TextAlign.Right.ToString();
            txtroqty.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
            txtrate.Style["TEXT-ALIGN"]    = TextAlign.Right.ToString();
            txtamount.Style["TEXT-ALIGN"]  = TextAlign.Right.ToString();
            txtckeckno.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
            txtchqamt.Style["TEXT-ALIGN"]  = TextAlign.Right.ToString();
            txtalotqty.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();

            //string dbname = "Warehouse";



            ComObj = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());


            //if (Session["dc_id"] != null)
            //{

            //}

            distobj = new DistributionCenters(ComObj);
            chk     = new chksql();
            ArrayList ctrllist = new ArrayList();
            ctrllist.Add(txtrono.Text);
            ctrllist.Add(txtrate.Text);
            ctrllist.Add(txtckeckno.Text);
            ctrllist.Add(txtchqamt.Text);
            ctrllist.Add(txtremark.Text);

            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }


            if (!IsPostBack)
            {
                txtddate.Text      = DateTime.Today.Date.ToString("dd-MM-yyyy");
                txtrovalidity.Text = DateTime.Today.Date.ToString("dd-MM-yyyy");
                txtrodate.Text     = DateTime.Today.Date.ToString("dd-MM-yyyy");

                GetDist();
                GetCommodity();
                GetScheme();
                GetName();
                GetBank();
                ddlallot_year.Items.Add((int.Parse(DateTime.Today.Year.ToString()) - 1).ToString());
                ddlallot_year.Items.Add(DateTime.Today.Year.ToString());
                ddlallot_year.SelectedIndex = 1;
                ddlalotmm.SelectedIndex     = DateTime.Today.Month - 1;
                if (version == "H")
                {
                    lblCommodity.Text        = Resources.LocalizedText.lblCommodity;
                    lblScheme.Text           = Resources.LocalizedText.lblScheme;
                    lblQuantity.Text         = Resources.LocalizedText.lblQuantity;
                    lblReleaseOrder.Text     = Resources.LocalizedText.lblDetailsofRO;
                    btnsave.Text             = Resources.LocalizedText.btnsave;
                    btnclose.Text            = Resources.LocalizedText.btnclose;
                    lblmonth.Text            = Resources.LocalizedText.lblmonth;
                    lblyear.Text             = Resources.LocalizedText.lblyear;
                    lblRateQuintal.Text      = Resources.LocalizedText.lblRateQuintal;
                    lblPaymentMode.Text      = Resources.LocalizedText.lblPaymentMode;
                    lblddchekno.Text         = Resources.LocalizedText.lblddchekno;
                    lblddchekdate.Text       = Resources.LocalizedText.lblddchekdate;
                    lblBankName.Text         = Resources.LocalizedText.lblBankName;
                    lblamount.Text           = Resources.LocalizedText.lblamount;
                    lblamountdd.Text         = Resources.LocalizedText.lblamountdd;
                    lblforDist.Text          = Resources.LocalizedText.lblforDist;
                    lblReleaseOrderDate.Text = Resources.LocalizedText.lblReleaseOrderDate;
                    lbldovalidity.Text       = Resources.LocalizedText.lbldovalidity;
                    lblRemark.Text           = Resources.LocalizedText.lblRemark;
                    lblReleaseOrderDate.Text = Resources.LocalizedText.lblReleaseOrderDate;
                    lblqty.Text     = Resources.LocalizedText.lblqty;
                    lbl_balqty.Text = Resources.LocalizedText.lbl_balqty;
                }
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["st_id"] != null)
        {
            txtqty.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this)");


            txtqty.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtqty.Attributes.Add("onchange", "return chksqltxt(this)");


            txtorderno.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this)");


            txtdate.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtdate.Attributes.Add("onchange", "return chksqltxt(this)");

            txtqty.Style["TEXT-ALIGN"]  = TextAlign.Right.ToString();
            txtrate.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();



            ComObj = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());



            distobj = new DistributionCenters(ComObj);
            chk     = new chksql();
            ArrayList ctrllist = new ArrayList();

            ctrllist.Add(txtqty.Text);
            ctrllist.Add(txtorderno.Text);

            ctrllist.Add(txtdate.Text);

            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }


            if (!IsPostBack)
            {
                GetDCName();
                //GetZone();
                //GetDist();
                Getsupplier();
                fillgrid();
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["issue_id"] != null)
        {
            distid  = Session["dist_id"].ToString();
            issueid = Session["issue_id"].ToString();
            version = Session["hindi"].ToString();

            ComObj = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());


            txtqty.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtbags.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtqty.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtqty.Attributes.Add("onchange", "return chksqltxt(this)");
            txtbags.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtbags.Attributes.Add("onchange", "return chksqltxt(this)");
            txtqty.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();

            txtspos.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
            txtbags.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
            chk = new chksql();
            ArrayList ctrllist = new ArrayList();
            ctrllist.Add(txtqty.Text);
            ctrllist.Add(txtbags.Text);
            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }

            if (!IsPostBack)
            {
                ddlopeningmonth.SelectedIndex = DateTime.Today.Month - 1;
                GetScheme();
                GetCommodity();
                GetCategory();
                //GetDCName();
                //GetPosition();
                GetSource();
                GetGodown();
                fillGrid();
                if (version == "H")
                {
                    lblSorcePfArrival.Text = Resources.LocalizedText.lblSorcePfArrival;
                    lblCommodity.Text      = Resources.LocalizedText.lblCommodity;
                    lblGodown.Text         = Resources.LocalizedText.lblGodown;
                    lblScheme.Text         = Resources.LocalizedText.lblScheme;
                    lblQuantity.Text       = Resources.LocalizedText.lblQuantity;
                    lblBagNumber.Text      = Resources.LocalizedText.lblBagNumber;
                    lblopendate.Text       = Resources.LocalizedText.lblopendate;
                    lblKgs.Text            = Resources.LocalizedText.lblKgs;
                    lblopendetails.Text    = Resources.LocalizedText.lblopendetails;
                    btnsubmit.Text         = Resources.LocalizedText.btnsubmit;
                    btnclose.Text          = Resources.LocalizedText.btnclose;
                }
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }
Beispiel #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Session["dist_id"] == null)
            {
                Response.Redirect("~/Session_Expire_Dist.aspx");
            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
        ComObj       = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());
        distid       = Session["dist_id"].ToString();
        sid          = Session["issue_id"].ToString();
        save.Enabled = true;
        if (Page.IsPostBack == false)
        {
            Session["issubmited"] = "No";

            tx_dd_date.Text     = DateTime.Today.Date.ToString("dd/MM/yyyy");
            tx_do_date.Text     = DateTime.Today.Date.ToString("dd/MM/yyyy");
            tx_do_validity.Text = DateTime.Today.Date.ToString("dd/MM/yyyy");
            tx_permit_date.Text = DateTime.Today.Date.ToString("dd/MM/yyyy");

            tx_dd_date.Text = DateTime.Today.Date.ToString("dd/MM/yyyy");


            ddd_allot_year.Items.Add((int.Parse(DateTime.Today.Year.ToString()) - 1).ToString());
            ddd_allot_year.Items.Add(DateTime.Today.Year.ToString());
            ddd_allot_year.Items.Add((int.Parse(DateTime.Today.Year.ToString()) + 1).ToString());
            ddd_allot_year.SelectedIndex = 1;
            get_comm();
            get_lead();
            get_scheme();
            get_bankname();
            ddl_allot_month.SelectedIndex = DateTime.Today.Month - 1;
        }

        //tx_do_no.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");
        //tx_permit_no.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");
        //tx_do_validity.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");
        //tx_permit_validity.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");
        tx_qty.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");
        tx_dd_amount.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");
        tx_rate_qt.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this);");

        tx_do_date.Attributes.Add("onkeypress", "return CheckCalDate(this)");
        tx_do_date.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_do_date.Attributes.Add("onchange", "return chksqltxt(this)");


        tx_do_validity.Attributes.Add("onkeypress", "return CheckCalDate(this)");
        tx_do_validity.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_do_validity.Attributes.Add("onchange", "return chksqltxt(this)");



        tx_dd_date.Attributes.Add("onkeypress", "return CheckCalDate(this)");
        tx_dd_date.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_dd_date.Attributes.Add("onchange", "return chksqltxt(this)");


        tx_qty.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_qty.Attributes.Add("onchange", "return chksqltxt(this)");

        tx_dd_amount.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_dd_amount.Attributes.Add("onchange", "return chksqltxt(this)");


        tx_rate_qt.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_rate_qt.Attributes.Add("onchange", "return chksqltxt(this)");

        tx_permit_no.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
        tx_permit_no.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_permit_no.Attributes.Add("onchange", "return chksqltxt(this)");

        //tx_do_no.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
        //tx_do_no.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        //tx_do_no.Attributes.Add("onchange", "return chksqltxt(this)");


        tx_dd_no.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
        tx_dd_no.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_dd_no.Attributes.Add("onchange", "return chksqltxt(this)");

        tx_dd_amount.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
        tx_dd_amount.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
        tx_dd_amount.Attributes.Add("onchange", "return chksqltxt(this)");



        hlinkpdo.Attributes.Add("onclick", "window.open('print_DeleveryOrder.aspx',null,'left=300, top=90, height=800, width= 650, status=n o, resizable= no, scrollbars= no, toolbar= no,location= no, menubar= no');");
        tx_permit_no.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
        //tx_do_no.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
        //tx_do_validity.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
        tx_qty.Style["TEXT-ALIGN"]          = TextAlign.Right.ToString();
        tx_rate_qt.Style["TEXT-ALIGN"]      = TextAlign.Right.ToString();
        tx_tot_amt.Style["TEXT-ALIGN"]      = TextAlign.Right.ToString();
        tx_allot_qty.Style["TEXT-ALIGN"]    = TextAlign.Right.ToString();
        tx_dd_no.Style["TEXT-ALIGN"]        = TextAlign.Right.ToString();
        tx_dd_amount.Style["TEXT-ALIGN"]    = TextAlign.Right.ToString();
        tx_already_iqty.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
        tx_balQty.Style["TEXT-ALIGN"]       = TextAlign.Right.ToString();
        tx_bal_ic.Style["TEXT-ALIGN"]       = TextAlign.Right.ToString();
        txtcomdty_bal.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();
        lbl_alloc.Visible  = false;
        lbl_issue.Visible  = false;
        lbl_curbal.Visible = false;
        //lbl_stock.Visible = false;
        lbl_qtalloc.Visible = false;
        lbl_qtcur.Visible   = false;
        lbl_qtissue.Visible = false;
        //lbl_qtstk.Visible = false;
        tx_allot_qty.Visible    = false;
        tx_already_iqty.Visible = false;
        //tx_bal_ic.Visible = false;
        tx_balQty.Visible = false;

        chk = new chksql();
        ArrayList ctrllist = new ArrayList();

        ctrllist.Add(tx_permit_no.Text);
        //ctrllist.Add(tx_do_no.Text);
        ctrllist.Add(tx_do_validity.Text);
        ctrllist.Add(tx_qty.Text);
        ctrllist.Add(tx_rate_qt.Text);

        ctrllist.Add(tx_do_date.Text);
        ctrllist.Add(tx_dd_date.Text);
        ctrllist.Add(tx_do_date.Text);

        if (chk == null)
        {
        }
        else
        {
            bool chkstr = chk.chksql_server(ctrllist);
            if (chkstr == true)
            {
                Page.Server.Transfer(HttpContext.Current.Request.Path);
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Label3.Text = "";

        if (Session["st_id"] != null)
        {
            ComObj = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());

            txtsupplier.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtsupplier.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtsupplier.Attributes.Add("onchange", "return chksqltxt(this)");

            txttenderrate.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this)");


            txttenderrate.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txttenderrate.Attributes.Add("onchange", "return chksqltxt(this)");

            txtmobileno.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this)");


            txtmobileno.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtmobileno.Attributes.Add("onchange", "return chksqltxt(this)");


            txtaddress.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txtaddress.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtaddress.Attributes.Add("onchange", "return chksqltxt(this)");

            txtpincode.Attributes.Add("onkeypress", "return CheckIsNumeric(event,this)");


            txtpincode.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtpincode.Attributes.Add("onchange", "return chksqltxt(this)");


            txttenderrate.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();

            txtbruitno.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");


            chk = new chksql();
            ArrayList ctrllist = new ArrayList();


            ctrllist.Add(txtaddress.Text);
            ctrllist.Add(txtmobileno.Text);
            ctrllist.Add(txtsupplier.Text);

            ctrllist.Add(txttenderrate.Text);

            ctrllist.Add(txtpincode.Text);
            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }


            if (!IsPostBack)
            {
                //GetDist();
                Getzone();
                Getsupplier();
                fillgird();
                fillgirdforselectedZone();
                fillgirdforTenderRate();

                GetState();
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["dist_id"] != null)
        {
            sid = Session["dist_id"].ToString();
            //string dbname = "Warehouse";
            txtqty.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtmobile.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtrate.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");

            txtqty.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtqty.Attributes.Add("onchange", "return chksqltxt(this)");

            txtmobile.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtmobile.Attributes.Add("onchange", "return chksqltxt(this)");

            txtrate.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtrate.Attributes.Add("onchange", "return chksqltxt(this)");

            txttname.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txttname.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txttname.Attributes.Add("onchange", "return chksqltxt(this)");

            txttadd.Attributes.Add("onkeypress", "return checksqlkey_gen(event,this)");
            txttadd.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txttadd.Attributes.Add("onchange", "return chksqltxt(this)");

            DaintyDate1.Attributes.Add("onkeypress", "return CheckCalDate(this)");
            DaintyDate1.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            DaintyDate1.Attributes.Add("onchange", "return chksqltxt(this)");


            txtmobile.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
            txtqty.Style["TEXT-ALIGN"]    = TextAlign.Right.ToString();
            txtrate.Style["TEXT-ALIGN"]   = TextAlign.Right.ToString();

            ComObj = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());


            distobj = new DistributionCenters(ComObj);
            chk     = new chksql();
            ArrayList ctrllist = new ArrayList();
            ctrllist.Add(txtqty.Text);
            ctrllist.Add(txtmobile.Text);
            ctrllist.Add(txtrate.Text);
            ctrllist.Add(txttname.Text);
            ctrllist.Add(txttadd.Text);
            ctrllist.Add(DaintyDate1.Text);
            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }


            if (Page.IsPostBack == false)
            {
                Fillgrid();
                GetTransportType();
                GetDistance();
                get_block();
                lbl_block.Visible = false;
                ddlBlock.Visible  = false;
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }
Beispiel #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["dist_id"] != null)
        {
            distid = Session["dist_id"].ToString();

            txtdisbags.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtdisqty.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtrecdqty.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");
            txtrackqty.Attributes.Add("onkeypress", "return CheckIsNumeric(this)");

            txtdisbags.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtdisbags.Attributes.Add("onchange", "return chksqltxt(this)");

            txtdisqty.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtdisqty.Attributes.Add("onchange", "return chksqltxt(this)");

            txtrecdqty.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtrecdqty.Attributes.Add("onchange", "return chksqltxt(this)");

            txtrackqty.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtrackqty.Attributes.Add("onchange", "return chksqltxt(this)");

            txtrackno.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txtrackno.Attributes.Add("onchange", "return chksqltxt(this)");

            tctchallanno.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            tctchallanno.Attributes.Add("onchange", "return chksqltxt(this)");

            txttruckno.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            txttruckno.Attributes.Add("onchange", "return chksqltxt(this)");


            DaintyDate2.Attributes.Add("onkeypress", "return CheckCalDate(this)");
            DaintyDate2.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            DaintyDate2.Attributes.Add("onchange", "return chksqltxt(this)");

            DaintyDate1.Attributes.Add("onkeypress", "return CheckCalDate(this)");
            DaintyDate1.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            DaintyDate1.Attributes.Add("onchange", "return chksqltxt(this)");

            DaintyDate3.Attributes.Add("onkeypress", "return CheckCalDate(this)");
            DaintyDate3.Attributes.Add("onkeydown", "return checksqlkey_special(event,this);");
            DaintyDate3.Attributes.Add("onchange", "return chksqltxt(this)");



            txtrecdqty.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
            txtdisbags.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
            txtdisqty.Style["TEXT-ALIGN"]  = TextAlign.Right.ToString();
            txttruckno.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();
            txtrackqty.Style["TEXT-ALIGN"] = TextAlign.Right.ToString();

            chk = new chksql();
            ArrayList ctrllist = new ArrayList();
            ctrllist.Add(txtrecdqty.Text);
            ctrllist.Add(txtdisbags.Text);
            ctrllist.Add(txtdisqty.Text);
            ctrllist.Add(txttruckno.Text);
            ctrllist.Add(txtrackqty.Text);
            ctrllist.Add(txtrackno.Text);
            ctrllist.Add(tctchallanno.Text);
            ctrllist.Add(txttruckno.Text);
            ctrllist.Add(DaintyDate1.Text);
            ctrllist.Add(DaintyDate2.Text);
            ctrllist.Add(DaintyDate3.Text);

            if (chk == null)
            {
            }
            else
            {
                bool chkstr = chk.chksql_server(ctrllist);
                if (chkstr == true)
                {
                    Page.Server.Transfer(HttpContext.Current.Request.Path);
                }
            }

            ComObj = new Common(ConfigurationManager.AppSettings["ConnectionString"].ToString());


            if (!IsPostBack)
            {
                txtrackddate.Text = DateTime.Today.Date.ToString("dd-MM-yyyy");
                DaintyDate2.Text  = DateTime.Today.Date.ToString("dd-MM-yyyy");
                DaintyDate3.Text  = DateTime.Today.Date.ToString("dd-MM-yyyy");

                GetDist();
                GetTransport();
                ddlrecddistrict.SelectedValue = distid;

                GetDCName();
                GetRecddist();
                GetDestRH();
                GetDestDist();
                dt.Columns.Add("district_code");
                dt.Columns.Add("Rack_No");
                dt.Columns.Add("IC_ID");
                dt.Columns.Add("IC_Name");
                dt.Columns.Add("Challan_No");
                dt.Columns.Add("Challan_date");
                dt.Columns.Add("Transporter_ID");
                dt.Columns.Add("Transporter_Name");
                dt.Columns.Add("Truck_No");
                dt.Columns.Add("Disp_Bags");
                dt.Columns.Add("Disp_Qty");


                Session["dt"] = dt;
                GetChallan();
            }
        }
        else
        {
            Response.Redirect("~/MainLogin.aspx");
        }
    }