Beispiel #1
0
        protected void LoadCompanyList()
        {
            BusinessLayer.Common.Company ObjCompany = new BusinessLayer.Common.Company();
            DataTable dt = ObjCompany.GetAll();

            if (dt != null)
            {
                dgvCompany.DataSource = dt;
                dgvCompany.DataBind();
            }
        }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if ((Session["UserId"] == null) && (Session["SuperAdmin"] == null))
     {
         Response.Redirect("../Login.aspx");
     }
     if (!IsPostBack)
     {
         BusinessLayer.Common.Company ObjCompany = new BusinessLayer.Common.Company();
         DataTable dt = ObjCompany.GetAll();
         if (dt != null)
         {
             ddlCompany.DataSource = dt;
             ddlCompany.DataBind();
         }
         ddlCompany.SelectedValue = Session["CompanyId"].ToString();
     }
 }