protected void RBUpdate_Click(object sender, EventArgs e)
    {
        AbcDAL MyDAL = new AbcDAL("");

        MyDAL.UpdateSubjectMaster(RCBSubjectName.SelectedValue, RTBUpdateName.Text);
        MyDAL.BindSubjectComboBox(RCBSubjectName);
        PopulateSubjectGrid();
    }
    protected void RBCreateSubject_Click(object sender, EventArgs e)
    {
        AbcDAL MyDAL = new AbcDAL("");

        MyDAL.AddSubjectMaster(RTBSubjectName.Text.Trim());
        PopulateSubjectGrid();
        MyDAL.BindSubjectComboBox(RCBSubjectName);
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     //PopulateStudentName();
     if (!IsPostBack)
     {
         AbcDAL MyDAL = new AbcDAL("");
         MyDAL.BindSubjectComboBox(RCBSubject);
     }
 }
    protected void RGSubjectGrid_DeleteCommand(object sender, GridCommandEventArgs e)
    {
        AbcDAL MyDAL = new AbcDAL("");

        Telerik.Web.UI.GridDataItem MyGridDataItem = e.Item as Telerik.Web.UI.GridDataItem;
        if (MyGridDataItem != null)
        {
            string SubjectID = (string)((GridDataItem)e.Item).GetDataKeyValue("SubjectID");


            MyDAL.DeleteSubjectMaster(SubjectID);
        }
        MyDAL.BindSubjectComboBox(RCBSubjectName);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        int    AuthorityID = 0;
        AbcDAL MyDAL       = new AbcDAL("");

        if (!IsPostBack)
        {
            // PopulateSubjectGrid();
            MyDAL.BindSubjectComboBox(RCBSubjectName);
            DataTable ResultTable = MyDAL.PopulateStudent();


            AuthorityID = Convert.ToInt32(ResultTable.Rows[0]["AuthorityID"]); //Getting my field value
            if (AuthorityID != 1002)
            {
                Response.Redirect("~/default.aspx?MsgPos=5&MsgType=warning&MsgContent=You are not authorised to this function, No students allowed !!!!");
            }
        }
    }
Example #6
0
    public void SubjectCombobox()
    {
        AbcDAL MyDAL = new AbcDAL("");

        MyDAL.BindSubjectComboBox(RCBSubject);
    }