Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        ViewState["Compid"]   = Session["Comid"].ToString();
        ViewState["UserName"] = Session["userid"].ToString();



        Page.Title = pg.getPageTitle(page);
        if (!IsPostBack)
        {
            lblcmpny.Text = Session["Cname"].ToString();
            Pagecontrol.dypcontrol(Page, page);
            ViewState["sortOrder"] = "";
            txtfromdt.Text         = System.DateTime.Now.Month.ToString() + "/1/" + System.DateTime.Now.Year.ToString();
            txttodt.Text           = System.DateTime.Now.ToShortDateString();
            fillgrid();
            fillemmmm();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);


        statuslable.Visible = false;
        if (!IsPostBack)
        {
            if (!IsPostBack)
            {
                Pagecontrol.dypcontrol(Page, page);
                ViewState["sortOrder"] = "";
                txtdate.Text           = DateTime.Now.ToShortDateString();
                fillstore();
                ddlwarehouse_SelectedIndexChanged(sender, e);
                fillgrid();
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };
        compid = Session["comid"].ToString();
        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);
        if (!IsPostBack)
        {
            statuslable.Text = "";
            Pagecontrol.dypcontrol(Page, page);
            //PageConn pgcon = new PageConn();
            //con = pgcon.dynconn;
            statuslable.Visible = false;

            ViewState["sortOrder"] = "";
            // ddl();
            fillwarehouse();
            // ModalPopupExtender1.Hide();
            ModalPopupExtender1222.Hide();
            FillGridView1();
        }
    }
Пример #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Login.aspx");
        }
        PageConn pgcon = new PageConn();

        conOADB = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title     = pg.getPageTitle(page);
        Label1.Visible = false;
        if (!Page.IsPostBack)
        {
            Pagecontrol.dypcontrol(Page, page);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        Page.Title = pg.getPageTitle(page);

        lblmsg.Visible = false;

        if (!IsPostBack)
        {
            Pagecontrol.dypcontrol(Page, page);
            ViewState["sortOrder"] = "";

            fillwarehouse();
            FillStateWithCountry();

            fillstore();
            ddlstore_SelectedIndexChanged(sender, e);
            fillgrid();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;

        if (Session["Comid"] == null)
        {
            Response.Redirect("~/ShoppingCart/Admin/ShoppingCartLogin.aspx");
        }
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        compid = Session["comid"].ToString();
        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        Page.Title = pg.getPageTitle(page);
        if (!IsPostBack)
        {
            ViewState["sortOrder"] = "";
            Fillwarehouse();
            fillsite();
            fillvendor();
            Fillfilterstore();
            Fillfiltervendor();
            Gridfill();
        }
    }
Пример #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //PageConn pgcon = new PageConn();
        //con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);
        if (!IsPostBack)
        {
            txtreqdate.Text        = DateTime.Now.ToShortDateString();
            ViewState["sortOrder"] = "";
            Pagecontrol.dypcontrol(Page, page);

            Fillwarehouse();
            fillemployee();
            fillfilteremployee();
            filltaxben();
            fillfiltertaxben();
            txttaxablename_SelectedIndexChanged(sender, e);
            gridfun();
        }
    }
Пример #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;

        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);
        //Session["pnl1"] = "8";
        // Session["pagename"] = "MessageViewSent.aspx";
        if (!Page.IsPostBack)
        {
            GetMessgeDetail();
            FillFileAttachDetail();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }
        compid = Session["comid"].ToString();

        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        compid     = Session["Comid"].ToString();
        Page.Title = pg.getPageTitle(page);
        ModalPopupExtender1222.Hide();

        Label1.Visible = false;

        if (!IsPostBack)
        {
            Pagecontrol.dypcontrol(Page, page);
            ViewState["sortOrder"] = "";
            //string strwh = "SELECT WareHouseId,Name,Address,CurrencyId FROM WareHouseMaster where comid='" + compid + "' and WareHouseMaster.Status='" + 1 + "'";
            //SqlCommand cmdwh = new SqlCommand(strwh, con);
            //SqlDataAdapter adpwh = new SqlDataAdapter(cmdwh);
            //DataTable dtwh = new DataTable();
            //adpwh.Fill(dtwh);



            //ddlWarehouse.DataSource = dtwh;
            //ddlWarehouse.DataTextField = "Name";
            //ddlWarehouse.DataValueField = "WareHouseId";

            //ddlWarehouse.DataBind();


            //DropDownList1.DataSource = dtwh;
            //DropDownList1.DataTextField = "Name";
            //DropDownList1.DataValueField = "WareHouseId";

            //DropDownList1.DataBind();
            //DropDownList1.Items.Insert(0, "ALL");
            //DropDownList1.Items[0].Value = "0";
            tXtEffectiveStartdate.Text = System.DateTime.Now.ToShortDateString();
            txtenddate.Text            = System.DateTime.Now.ToShortDateString();

            fillstore();
            fillstorewithfilter();
            filldatagrid();
        }
    }
Пример #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);

        if (!IsPostBack)
        {
            ViewState["sortOrder"] = "";
            fillstore();
            fillfilterstore();
            fillddldepartment();
            fillgrid();
            statuslable.Visible = false;
            lblCompany.Text     = Session["Cname"].ToString();

            lblBusiness.Text = "All";
        }
    }
Пример #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/ShoppingCart/Admin/ShoppingCartLogin.aspx");
        }
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        Session["PageUrl"]  = strData;
        Session["PageName"] = page;

        Page.Title = pg.getPageTitle(page);

        if (!Page.IsPostBack)
        {
            Pagecontrol.dypcontrol(Page, page);
            ViewState["sortOrder"] = "";
            lblcom.Text            = Session["Cname"].ToString();

            fillstore();
            fillfilterstore();
            FillRuleType();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }

        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };
        //  compid = Session["comid"].ToString();
        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);

        if (!Page.IsPostBack)
        {
            ViewState["sortOrder"] = "";
            Pagecontrol.dypcontrol(Page, page);
            fillstore();
            fillparty();
            Employee();
            fillgrid();
            filljob();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }

        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        Page.Title = pg.getPageTitle(page);

        Page.Form.Attributes.Add("enctype", "multipart/form-data");
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;

        ViewState["Compid"]    = Session["Comid"].ToString();
        ViewState["UserName"]  = Session["userid"].ToString();
        ViewState["sortOrder"] = "";
        if (!IsPostBack)
        {
            Pagecontrol.dypcontrol(Page, page);
            fillwarehouse();
            fillwarehouse1();
            fillgrid();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        Session["PageUrl"]  = strData;
        Session["PageName"] = page;
        Page.Title          = pg.getPageTitle(page);


        if (!Page.IsPostBack)
        {
            lblcomid.Text          = Session["Cname"].ToString();
            ViewState["sortOrder"] = "";
            ViewState["sortOrder"] = "";
            ViewState["Dltitem"]   = "";
            fillstore();
            fillfilterstore();
            FillDocumentApproveType();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };
        compid = Session["comid"].ToString();
        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);

        lblmsg.Visible = false;
        if (!IsPostBack)
        {
            Pagecontrol.dypcontrol(Page, page);
            ViewState["sortOrder"] = "";
            lblcomname.Text        = Convert.ToString(Session["Cname"]);
            //  checkaccess();
            fillddl();
            fill();
        }
    }
Пример #16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);
        if (!IsPostBack)
        {
            ViewState["sortOrder"] = "";
            Pagecontrol.dypcontrol(Page, page);
            txtdate.Text = DateTime.Now.ToShortDateString();
            Fillwarehouse();
            fillPayrolltax();
            filltaxyear();
            fillempddl();

            fillfilteremployee();
            // fillgrid();
            //  filterstore();

            // Fillddlbatchname();
            //  Filteremployee();
            fillgrid();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //PageConn pgcon = new PageConn();
        //con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);

        if (!Page.IsPostBack)
        {
            ViewState["sortOrder"] = "";
            lblCompany.Text        = Session["Cname"].ToString();

            fillstore();
            fillgrid();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);
        if (!IsPostBack)
        {
            ViewState["sortOrder"] = "";
            txteenddate.Text       = System.DateTime.Now.ToShortDateString();
            txtenddateto.Text      = System.DateTime.Now.ToShortDateString();
            fillstore();
            fillbatch();
            fillemployee();
            fillgrid();
        }
    }
Пример #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }

        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };
        //  compid = Session["comid"].ToString();
        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);

        if (!Page.IsPostBack)
        {
            Pagecontrol.dypcontrol(Page, page);

            fillstore();
            if (Request.QueryString["jdid"] != null)
            {
                Rdprojecttype.SelectedIndex = 1;
            }
            fillparty();
            Rdprojecttype_SelectedIndexChanged(sender, e);
            //fillgrid();
        }
    }
Пример #20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["EmployeeId"] == "")
        {
            Response.Redirect("~/Login.aspx");
        }

        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);

        if (!IsPostBack)
        {
            ViewState["sortOrder"] = "";

            //txtestartdate.Text = System.DateTime.Now.ToShortDateString();
            //txteenddate.Text = System.DateTime.Now.ToShortDateString();

            gethours();

            BindGrid();
        }
    }
Пример #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //PageConn pgcon = new PageConn();
        //con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);
        if (!IsPostBack)
        {
            txtreqdate.Text        = DateTime.Now.ToShortDateString();
            ViewState["sortOrder"] = "";
            Pagecontrol.dypcontrol(Page, page);
            fillpaymentcycle();
            Fillwarehouse();

            //  fillPayrolltax();
            ddlstrname_SelectedIndexChanged1(sender, e);
            fillfilteremployee();
            ddlpaycycle.Items.Insert(0, "Select");
            ddlpaycycle.Items[0].Value = "0";
            filltaxyearfilter();
            lblCompany.Text = Session["Cname"].ToString();
            gridfun();
        }
    }
Пример #22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }

        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        GridView1.PagerSettings.Visible = true;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        compid     = Session["Comid"].ToString();
        Page.Title = pg.getPageTitle(page);
        // Label1.Visible = false;
        if (!IsPostBack)
        {
            Pagecontrol.dypcontrol(Page, page);
            ViewState["sortOrder"] = "";


            // ModalPopupExtender1.Hide();
            //ModalPopupExtender1222.Hide();
            FillGridView1();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }

        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg = new pagetitleclass();

        string strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        Session["PageUrl"]  = strData;
        Session["PageName"] = page;
        Page.Title          = pg.getPageTitle(page);

        if (!IsPostBack)
        {
            fillstore();
            fillgrid();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();


        Page.Title = pg.getPageTitle(page);

        //Session["pagename"] = "EmailTypeMaster.aspx";
        // Session["pnl1"] = "8";
        Session["pnlM"] = "1";
        Session["pnl1"] = "17";
        Label1.Visible  = false;
        compid          = Session["comid"].ToString();
        if (!IsPostBack)
        {
            Pagecontrol.dypcontrol(Page, page);
            fillwarehouse();
            ViewState["sortOrder"] = "";
            fillgrid();
        }
    }
Пример #25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        compid     = Session["Comid"].ToString();
        Page.Title = pg.getPageTitle(page);

        uid = Convert.ToInt32(Session["userid"]);
        getwhid();

        if (!IsPostBack)
        {
            lblalphanum.Text = alphanum();
            lblnum.Text      = number(8).ToString();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            // Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }

        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        Session["PageUrl"]  = strData;
        Session["PageName"] = page;
        Page.Title          = pg.getPageTitle(page);
        if (Session["CompanyName"] != null)
        {
            this.Title = Session["CompanyName"] + " IFileCabinet.com - Edit Document";
        }

        Session["PageName"] = "DocumentCopyPaste.aspx";

        if (!IsPostBack)
        {
            Pagecontrol.dypcontrol(Page, page);
            int Docid = Convert.ToInt32(Request.QueryString["id"]);
            hdnDocId.Value = Request.QueryString["id"];
            // int Docid = 145;
            // int DesignationId = Convert.ToInt32(Request.QueryString["Did"]);
            ViewState["docid"] = Docid.ToString();
            if (Convert.ToString(ViewState["docid"]) != "")
            {
                DataTable      dt  = new DataTable();
                string         doc = "Select DocumentMainType.Whid FROM DocumentMainType INNER JOIN DocumentSubType ON DocumentMainType.DocumentMainTypeId = DocumentSubType.DocumentMainTypeId INNER JOIN DocumentType ON DocumentSubType.DocumentSubTypeId = DocumentType.DocumentSubTypeId inner join DocumentMaster on DocumentMaster.DocumentTypeId=DocumentType.DocumentTypeId where DocumentMainType.CID='" + Session["Comid"] + "' and DocumentMaster.DocumentId='" + ViewState["docid"] + "'";
                SqlDataAdapter adp = new SqlDataAdapter(doc, con);
                adp.Fill(dt);
                if (dt.Rows.Count > 0)
                {
                    ViewState["Whid"] = Convert.ToString(dt.Rows[0]["Whid"]);
                }
            }
            LoadPdf(Docid);

            FillDocumentMainType();

            FillDocDetail(sender, e);
        }

        DocumentName  = ViewState["docname"].ToString();
        DocumentID    = Convert.ToInt32(ViewState["docId"]);
        DesignationId = Convert.ToInt32(Session["DesignationId"]);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        Session["PageUrl"]  = strData;
        Session["PageName"] = page;
        Page.Title          = pg.getPageTitle(page);
        DataTable dsss = new DataTable();

        //dsss = clsMessage.Empid("158");
        //if (dsss.Rows.Count > 0)
        //{
        //     Session["EmployeeIdep"] = dsss.Rows[0]["EmployeeMasterId"].ToString();
        //}
        if (Session["CompanyName"] != null)
        {
            this.Title = Session["CompanyName"] + " IFileCabinet.com Sent Messages ";
        }

        Session["EmployeeIdep"] = Session["EmployeeId"];

        Session["PageName"] = "MessageSentExt.aspx";

        pnlmsg.Visible = false;
        if (!Page.IsPostBack)
        {
            Pagecontrol.dypcontrol(Page, page);
            ViewState["sortOrder"] = "";
            fillddl();

            //ddlperiod.SelectedValue = "3";

            filldatebyperiod();
            fillusertype();
            fillusertype111();
            fillusername();

            filltask();
            fillproject();

            fillextraemail();
            SelectMsgforSendBox();
        }
    }
    // string save;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        Session["PageUrl"]  = strData;
        Session["PageName"] = page;
        Page.Title          = pg.getPageTitle(page);
        if (!IsPostBack)
        {
            ViewState["sortOrder"] = "";
            string str = "SELECT WareHouseId,Name,Address,CurrencyId  FROM WareHouseMaster where comid = '" + Session["comid"] + "'and WareHouseMaster.Status='" + 1 + "' order by name";

            SqlCommand cmd1 = new SqlCommand(str, con);
            cmd1.CommandType = CommandType.Text;
            SqlDataAdapter da = new SqlDataAdapter(cmd1);
            DataTable      dt = new DataTable();
            da.Fill(dt);
            lblCompany.Text         = Session["comid"].ToString();
            lblBusiness.Text        = "All";
            ddlstore.DataSource     = dt;
            ddlstore.DataTextField  = "Name";
            ddlstore.DataValueField = "WareHouseId";
            ddlstore.DataBind();

            ddlstore_SelectedIndexChanged(sender, e);

            ddlfilterstore.DataSource     = dt;
            ddlfilterstore.DataTextField  = "Name";
            ddlfilterstore.DataValueField = "WareHouseId";
            ddlfilterstore.DataBind();
            ddlfilterstore.Items.Insert(0, "All");
            ddlfilterstore.Items[0].Value = "0";
            //ddlinoutemailmasterid.Items.Insert(0, "Select");
            //ddlinoutemailmasterid.Items[0].Value = "0";

            //ddlforwordemailiD.Items.Insert(0, "Select");
            //ddlforwordemailiD.Items[0].Value = "0";
            ddlmovefolder.Items.Insert(0, "Select");
            ddlmovefolder.Items[0].Value = "0";


            Fillgrid();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Comid"] == null)
        {
            Response.Redirect("~/Shoppingcart/Admin/ShoppingCartLogin.aspx");
        }


        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        Session["PageUrl"]  = strData;
        Session["PageName"] = page;
        Page.Title          = pg.getPageTitle(page);



        if (!IsPostBack)
        {
            Pagecontrol.dypcontrol(Page, page);
            lblCompany.Text        = Session["Cname"].ToString();
            ViewState["sortOrder"] = "";
            lblmsg.Text            = "";

            flaganddoc();
            fillstore();
            fillfilterstore();



            //DataTable dt1 = new DataTable();
            //dt1 = clscompany.selectCompanyMaster();
            //if (dt1.Rows.Count > 0)
            //{
            //    if (Convert.ToString(dt1.Rows[0]["DocFolder"]) == "True")
            //    {
            //        RadioButtonList1.SelectedIndex = 1;

            //    }
            //    else
            //    {
            //        RadioButtonList1.SelectedIndex = 0;
            //    }

            //}
            FillGrid();
            RadioButtonList1_SelectedIndexChanged(sender, e);

            FillDocumentTypeAll();
            FillParty();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        PageConn pgcon = new PageConn();

        con = pgcon.dynconn;
        pagetitleclass pg      = new pagetitleclass();
        string         strData = Request.Url.ToString();

        char[] separator = new char[] { '/' };

        string[] strSplitArr = strData.Split(separator);
        int      i           = Convert.ToInt32(strSplitArr.Length);
        string   page        = strSplitArr[i - 1].ToString();

        compid     = Session["Comid"].ToString();
        Page.Title = pg.getPageTitle(page);
        if (!IsPostBack)
        {
            lblCompany.Text = Session["Cname"].ToString();

            if (Request.QueryString["Id"] != null)
            {
                int id = Convert.ToInt32(Request.QueryString["Id"]);

                SqlCommand     cmdmax = new SqlCommand("select * from PartyTypeCategoryMasterTbl where PartyTypeCategoryMasterId='" + id.ToString() + "' ", con);
                SqlDataAdapter adpmax = new SqlDataAdapter(cmdmax);
                DataTable      dsmax  = new DataTable();
                adpmax.Fill(dsmax);

                if (dsmax.Rows.Count > 0)
                {
                    fillwarehouse();
                    ddlSearchByStore.SelectedIndex = ddlSearchByStore.Items.IndexOf(ddlSearchByStore.Items.FindByValue(dsmax.Rows[0]["Whid"].ToString()));
                    filldiscountcategory();
                    ddldiscountcategory.SelectedIndex = ddldiscountcategory.Items.IndexOf(ddldiscountcategory.Items.FindByValue(dsmax.Rows[0]["PartyTypeCategoryMasterId"].ToString()));
                    fillfilterwarehouse();
                    fillfiltertdiscountcategory();
                    fillcountry();
                    fillstatebyfilter();
                    fillcity();
                    RadioButtonList1_SelectedIndexChanged(sender, e);
                }
            }
            else
            {
                fillwarehouse();
                filldiscountcategory();

                fillfilterwarehouse();
                fillfiltertdiscountcategory();
                fillcountry();
                fillstatebyfilter();
                fillcity();
                RadioButtonList1_SelectedIndexChanged(sender, e);
            }
        }
    }