Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserID"] == null)
            {
                Response.Redirect("../../close_win.aspx");
            }

            SqlConnection sqlConn = new SqlConnection(CBSAppUtils.PrimaryConnectionString);

            DC = new DataCenter(sqlConn);

            if (!IsPostBack)
            {
                int sComID = (int)Session["CompanyID"];
                DC.PopulateChildCompany(sComID, ddlCompany);

                string v = ddlCompany.Items[0].Value;
                ddlCompany.SelectedValue = v;
                ddlCompany_SelectedIndexChanged(sender, e);
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserID"] == null)
            {
                Response.Redirect("../../close_win.aspx");
            }

            if (Request.QueryString.Count == 0)
            {
                btnCancel_Click(sender, e);
            }

            SqlConnection sqlConn = new SqlConnection(CBSAppUtils.PrimaryConnectionString);

            DC = new DataCenter(sqlConn);

            if (!IsPostBack)
            {
                int comID  = Convert.ToInt32(Request.QueryString["cid"]);
                int docID  = Convert.ToInt32(Request.QueryString["did"]);
                int sComID = (int)Session["CompanyID"];

                DC.PopulateChildCompany(sComID, ddlCompany);
                ddlCompany.SelectedValue = DC.ReturnClientCompanyID(docID).ToString();
                ddlCompany_SelectedIndexChanged(sender, e);
                ddlBatchType_SelectedIndexChanged(sender, e);
            }

            int c = 0;

            if (Session["pages"] != null)
            {
                c = Convert.ToInt32(Session["pages"]);
            }
            LoadCheckBoxes(c);
        }