Пример #1
0
    protected void BindOfficeView()
    {
        blDio.Ofc_mappingid = Session["EmpMapID"].ToString();
        blDio.Userid        = Session["username"].ToString();
        dt = dlDio.select_admin_info(blDio);
        if (dt.table.Rows.Count > 0)
        {
            blDio.Role = dt.table.Rows[0]["RollID"].ToString();
            //lbl_rolename.Text = dt.table.Rows[0]["Name_en"].ToString();
            if (blDio.Role == "1")
            {
                blDio.District = null;
                blDio.State    = null;
            }
            else if (blDio.Role == "4")
            {
                blDio.District        = dt.table.Rows[0]["district_id"].ToString();
                blDio.State           = dt.table.Rows[0]["state_id"].ToString();
                blDio.Officelevelcode = "00";  // Seperate the mantralay and head office
            }
            if (blDio.Role == "5")
            {
                blDio.Officeid = dt.table.Rows[0]["NewOfficeCode"].ToString();
            }
        }
        dt = dl.GetTotalOfficeInGrid(blDio);

        int row = dt.table.Rows.Count;
        int page;

        if (row % 10 == 0)
        {
            page = row / 10;
        }
        else
        {
            page = row / 10;
            page = page + 1;
        }
        if (Session["language"].ToString() == "en-GB")
        {
            lbl_count.Text = "Total Office = " + row.ToString() + "  and  Total page = " + page.ToString() + "";
        }
        else
        {
            lbl_count.Text = "कुल कार्यालय = " + row.ToString() + "  और  कुल पेज = " + page.ToString() + "";
        }
        // lbl_count.Text = "Total Rows = " + row.ToString() + "  and  Total page = " + page.ToString() + "";
        GV_Office.DataSource = dt.table;
        GV_Office.DataBind();
    }
Пример #2
0
    protected void BindOfficeView()
    {
        bl1.Base_department = ddl_department.SelectedValue;
        bl1.District        = ddl_district.SelectedValue;

        rd = dl1.GetTotalOfficeInGrid1(bl1);

        int row = rd.table.Rows.Count;
        int page;

        if (row % 10 == 0)
        {
            page = row / 10;
        }
        else
        {
            page = row / 10;
            page = page + 1;
        }

        lbl_count.Text       = "Total Office = " + row.ToString() + "  and  Total page = " + page.ToString() + "";
        GV_Office.DataSource = rd.table;
        GV_Office.DataBind();
    }