protected void grd_GMPresentReports_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            string Nimsal = ddl_Nimsal.Items[0].Value;
            string user   = "";

            if (ddl_Nimsal.SelectedValue != "null")
            {
                Nimsal = ddl_Nimsal.SelectedValue;
            }
            if (ddl_MG.SelectedValue != "")
            {
                user = ddl_MG.SelectedValue;
            }

            ProfPresentBusiness pb = new ProfPresentBusiness();

            System.Data.DataTable dt = pb.GetMGTimeByUserName_Term(user, Nimsal);
            if (dt.Columns.Contains("error"))
            {
                //Response.Write(dt.Rows[0]["error"].ToString());
            }
            else
            {
                grd_GMPresentReports.DataSource = dt;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            CommonBusiness      cb = new CommonBusiness();
            ProfPresentBusiness pb = new ProfPresentBusiness();

            if (!IsPostBack)
            {
                // تمام نیمسال های قابل قبول را بر می گرداند

                System.Data.DataTable dt = cb.getActiveTerm_AdobeConnection();


                ddl_Nimsal.DataSource     = removeSummerTerms(dt);
                ddl_Nimsal.DataValueField = "Term";
                ddl_Nimsal.DataTextField  = "Term";
                ddl_Nimsal.DataBind();
                ddl_Nimsal.SelectedIndex = dt.Rows.Count - 1;

                ddl_MG.DataSource     = pb.GetMGUsers(ddl_Nimsal.SelectedItem.Value);
                ddl_MG.DataValueField = "GroupManagerUser";
                ddl_MG.DataTextField  = "GroupManagerName";
                ddl_MG.DataBind();

                manageAccessControl();
            }
        }
        protected void ddl_Nimsal_SelectedIndexChanged(object sender, EventArgs e)
        {
            ProfPresentBusiness pb = new ProfPresentBusiness();

            ddl_MG.DataSource     = pb.GetMGUsers(ddl_Nimsal.SelectedValue);
            ddl_MG.DataValueField = "GroupManagerUser";
            ddl_MG.DataTextField  = "GroupManagerName";
            ddl_MG.DataBind();
        }
Exemplo n.º 4
0
        protected void grd_ProfPresentReports_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            string Nimsal         = ddl_Nimsal.Text;
            int    DepartmentCode = 0;

            if (ddl_Daneshkade.SelectedIndex != 0)
            {
                DepartmentCode = int.Parse(ddl_Daneshkade.SelectedValue);
            }
            ProfPresentBusiness pb = new ProfPresentBusiness();

            grd_ProfPresentReport.DataSource = pb.GetProfessorListByDepartment_Term(Nimsal, DepartmentCode);
        }
Exemplo n.º 5
0
        protected void btn2_Click(object sender, EventArgs e)
        {
            string Nimsal         = ddl_Nimsal.Text;
            int    DepartmentCode = 0;

            if (ddl_Daneshkade.SelectedIndex != 0)
            {
                DepartmentCode = int.Parse(ddl_Daneshkade.SelectedValue);
            }
            ProfPresentBusiness pb = new ProfPresentBusiness();

            grd_ProfPresentReport.DataSource = pb.GetProfessorListByDepartment_Term(Nimsal, DepartmentCode);
            grd_ProfPresentReport.DataBind();
        }
        private void setGridGroupManagerReport()
        {
            ProfPresentBusiness pb = new ProfPresentBusiness();

            try
            {
                System.Data.DataTable dt = pb.GetMGTimeByUserName_Term(ddl_MG.SelectedValue, ddl_Nimsal.SelectedValue);
                if (dt.Columns.Contains("error"))
                {
                    //Response.Write(dt.Rows[0]["error"].ToString());
                }
                else
                {
                    grd_GMPresentReports.DataSource = dt;
                }
            }
            catch (Exception exx)
            {
                Response.Write(exx.Message);
            }
        }