protected void Page_Load(object sender, EventArgs e)
    {
        //admin olub olmadigin yoxlayaq
        if (DALC._GetAdministratorsLogin.UsersStatusID != 30 && DALC._GetAdministratorsLogin.UsersStatusID != 25)
        {
            LnkNew.Visible = false;
            GrdAuditsOrganizations.Columns[GrdAuditsOrganizations.Columns.Count - 1].Visible = false;
            GrdAuditsOrganizations.Columns[GrdAuditsOrganizations.Columns.Count - 3].Visible = false;
        }

        if (string.IsNullOrEmpty(Config._GetQueryString("p")))
        {
            Session[_FilterSessionName] = null;
        }
        if (!this.IsPostBack)
        {
            DlistRegionalCenter.DataSource = DALC.GetRegionalCenters();
            DlistRegionalCenter.DataBind();
            DlistRegionalCenter.Items.Insert(0, new ListItem("--", "-1"));
            DListSubOrganization.DataSource = DALC.GetOrganizationSub("-1");
            DListSubOrganization.DataBind();
            DListSubOrganization.Items.Insert(0, new ListItem("--", "-1"));
            DlistVisitType.DataSource = DALC.GetVisitTypes();
            DlistVisitType.DataBind();
            DlistVisitType.Items.Insert(0, new ListItem("--", "-1"));

            DlistRegionalCenterFilter.DataSource = DALC.GetRegionalCenters();
            DlistRegionalCenterFilter.DataBind();
            DlistRegionalCenterFilter.Items.Insert(0, new ListItem("--", "-1"));


            DListParentOrganizationFilter.DataSource = DALC.GetOrganizationTop();
            DListParentOrganizationFilter.DataBind();
            DListParentOrganizationFilter.Items.Insert(0, new ListItem("--", "-1"));

            DlistTopOrganization.DataSource = DALC.GetOrganizationTop();
            DlistTopOrganization.DataBind();
            DlistTopOrganization.Items.Insert(0, new ListItem("--", "-1"));


            DListTopOrganizationFilter_SelectedIndexChanged(null, null);
            DlistTopOrganization_SelectedIndexChanged(null, null);

            DlistVisitTypeFilter.DataSource = DALC.GetVisitTypes();
            DlistVisitTypeFilter.DataBind();
            DlistVisitTypeFilter.Items.Insert(0, new ListItem("--", "-1"));

            DlistUsers.DataSource = DALC.GetUsers();
            DlistUsers.DataBind();
            BindGrid();
        }
    }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //eger emeliyaytci deyilse bu sehifeni menuda gore bilmez. demeli url-e yazib gelib bu sehifeye. error sehifesine redirect edek
     if (DALC._GetAdministratorsLogin.UsersStatusID != 30)
     {
         Config.RedirectError();
         return;
     }
     if (!this.IsPostBack)
     {
         DlistRegionalCenter.DataSource = DALC.GetRegionalCenters();
         DlistRegionalCenter.DataBind();
         DlistRegionalCenter.Items.Insert(0, new ListItem("--", "-1"));
         DlistUsersStatus.DataSource = DALC.GetUsersStatus();
         DlistUsersStatus.DataBind();
         DlistUsersStatus.Items.Insert(0, new ListItem("--", "-1"));
     }
     BindGrid();
 }