Example #1
0
        protected void OnSelectedIndexChanged(object sender, EventArgs e)
        {
            foreach (GridViewRow row in Module_GD.Rows)
            {
                if (row.RowIndex == Module_GD.SelectedIndex)
                {
                    row.ToolTip = string.Empty;

                    BusinessLayer.EditModuleReq R = new BusinessLayer.EditModuleReq();
                    {
                        int    mmID = int.Parse(row.Cells[1].Text);
                        string str  = row.Cells[0].Text;
                        Session.Add("REQ_Module", str);
                        Session.Add("REQ_ID", mmID);
                        if (grdRequirment.Rows.Count > 0)
                        {
                        }
                        DataTable dt1 = R.GetModuleReq(mmID);
                        grdRequirment.DataSource = dt1;
                        grdRequirment.DataBind();
                        UpdatePanel1.Update();
                    }
                }
                else
                {
                    row.BackColor = ColorTranslator.FromHtml("#FFFFFF");
                    row.ToolTip   = "Click to select this row";
                }
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            {
                BusinessLayer.EditModuleReq R = new BusinessLayer.EditModuleReq();

                DataTable dt = R.GetModuleInfo();

                Module_GD.DataSource = dt;
                Module_GD.DataBind();
            }
        }
Example #3
0
        void CheckStateOnGrid()
        {
            BusinessLayer.EditModuleReq R = new BusinessLayer.EditModuleReq();

            int       id  = int.Parse(Session["REQ_ID"].ToString());
            DataTable dt1 = R.GetModuleReq(id);
            {
                foreach (DataRow dr in dt1.Rows)
                {
                    string str = dr["Academic_info"].ToString();
                    int    idd = int.Parse(dr["ExpertiseLevel_ID"].ToString());
                    SetCheckState(str, idd);
                }
            }
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BusinessLayer.EditModuleReq R = new BusinessLayer.EditModuleReq();
            DataTable dt = R.GetAssocitedMoudleinfo();

            grdRequirment.DataSource = dt;
            grdRequirment.DataBind();

            Label1.Text = Session["REQ_Module"].ToString();

            if (!IsPostBack)
            {
                CheckStateOnGrid();
            }
        }
Example #5
0
        // To save the module requirements in database and go back
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int AcademicModule_ID = int.Parse(Session["REQ_ID"].ToString());

            BusinessLayer.EditModuleReq R = new BusinessLayer.EditModuleReq();
            R.DeleteModuleReq(AcademicModule_ID);

            foreach (GridViewRow gdrow in grdRequirment.Rows)
            {
                int AcademicInfo_ID = int.Parse(gdrow.Cells[1].Text.Trim());


                RadioButton rbt  = (RadioButton)gdrow.FindControl("RowSelector");
                RadioButton rbt1 = (RadioButton)gdrow.FindControl("RowSelector1");
                RadioButton rbt3 = (RadioButton)gdrow.FindControl("RowSelector2");
                RadioButton rbt4 = (RadioButton)gdrow.FindControl("RowSelector3");
                if (rbt.Checked)
                {
                }
                else
                {
                    int level = 1;

                    if (rbt1.Checked)
                    {
                        level = 2;
                    }
                    else if (rbt3.Checked)
                    {
                        level = 3;
                    }
                    else if (rbt4.Checked)
                    {
                        level = 4;
                    }
                    if (level > 1)
                    {
                        R.InsertModuleReq(AcademicModule_ID, AcademicInfo_ID, level);
                    }
                }
            }
            Response.Redirect("~/AdminPanel.aspx");
        }