예제 #1
0
 private void loaddata(int id)
 {
     try
     {
         DataRow dr = StaffMst.GetDataByKey(id);
         if (dr != null)
         {
             txtadd.Text    = dr["Add"].ToString();
             txtcity.Text   = dr["Name"].ToString();
             txtemail.Text  = dr["Email"].ToString();
             txtmobile.Text = dr["Mobile"].ToString();
             txtname.Text   = dr["Name"].ToString();
             txtpin.Text    = dr["Pincode"].ToString();
             txtqual.Text   = dr["Qualification"].ToString();
             txtuname.Text  = dr["Uname"].ToString();
             if (!string.IsNullOrEmpty(dr["StdId"].ToString()))
             {
                 drpstd.SelectedValue = dr["StdId"].ToString();
             }
             DropDownList1.SelectedItem.Text = dr["Gender"].ToString();
             StaffId     = id;
             btnadd.Text = "Update";
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            lbl.Text = "";
            if (!Page.IsPostBack)
            {
                if (Session["SID"] != null)
                {
                    DataRow StaffDT = StaffMst.GetDataByKey(int.Parse(Session["SID"].ToString()));


                    if (StaffDT != null && StaffDT["StdId"].ToString() != "")
                    {
                        lbl_standard.Text = StaffDT["StdName"].ToString();
                        BindDiv(int.Parse(StaffDT["StdId"].ToString()));
                        BindExam();
                        // BindGridiv();
                    }

                    if (!string.IsNullOrEmpty(Request.QueryString["ResultId"]))
                    {
                        string id = Request.QueryString["ResultId"];
                        loaddata(int.Parse(id));
                    }
                }
            }
        }
        protected void GvStudent_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            // StudentMst.Delete(Convert.ToInt32(GvwResult.DataKeys[e.RowIndex].Value));
            if (Session["SID"] != null)
            {
                DataRow StaffDT = StaffMst.GetDataByKey(int.Parse(Session["SID"].ToString()));


                if (StaffDT != null && StaffDT["StdId"].ToString() != "")
                {
                    DataTable Student_dt = StudentResult.GetAllResultDataByStId(int.Parse(StaffDT["StdId"].ToString()));
                    GvwResult.DataSource = Student_dt;
                    GvwResult.DataBind();
                }
            }
        }
예제 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Page.IsPostBack == false)
     {
         if (Session["SID"] != null)
         {
             DataRow staffsr = StaffMst.GetDataByKey(int.Parse(Session["SID"].ToString()));
             if (staffsr != null)
             {
                 Image4.ImageUrl = staffsr["Image"].ToString();
                 Label1.Text     = "Welcome " + staffsr["name"].ToString();
                 Session["std"]  = staffsr["stdname"].ToString();
             }
         }
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         DataRow staffdr = StaffMst.GetDataByKey(int.Parse(Session["SID"].ToString()));
         if (staffdr != null)
         {
             lblname.Text        = staffdr["Name"].ToString();
             lblstd.Text         = staffdr["stdname"].ToString();
             txtemail.Text       = staffdr["email"].ToString();
             txtmobile.Text      = staffdr["mobile"].ToString();
             txtadd.Text         = staffdr["add"].ToString();
             txtcity.Text        = staffdr["city"].ToString();
             txtpin.Text         = staffdr["pincode"].ToString();
             Imgprofile.ImageUrl = staffdr["image"].ToString();
             ViewState["sid"]    = staffdr["SID"].ToString();
         }
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack == false)
            {
                if (Session["SID"] != null)
                {
                    DataRow StaffDT = StaffMst.GetDataByKey(int.Parse(Session["SID"].ToString()));


                    if (StaffDT != null && StaffDT["StdId"].ToString() != "")
                    {
                        DataTable Student_dt = StudentResult.GetAllResultDataByStId(int.Parse(StaffDT["StdId"].ToString()));
                        GvwResult.DataSource = Student_dt;
                        GvwResult.DataBind();
                    }
                }
                BindExam();
            }
        }
예제 #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //  lblatt.Text = "";
     // lblcnt.Text = "";
     if (Page.IsPostBack == false)
     {
         DataRow staffdr = StaffMst.GetDataByKey(int.Parse(Session["SID"].ToString()));
         if (staffdr != null)
         {
             //StdDT = StdAdapter.SelectStd();
             //drpstd.DataSource = StdDT;
             //drpstd.DataTextField = "STDName";
             //drpstd.DataValueField = "SID";
             //drpstd.DataBind();
             //  drpstd.Items.Insert(0, "SELECT");
             BindStandard(int.Parse(staffdr["StdId"].ToString()));
             lblstd.Text = staffdr["StdName"].ToString();
         }
     }
 }
예제 #8
0
        protected void Bindgridview(string status)
        {
            try
            {
                if (Session["SID"] != null)
                {
                    int staffId = int.Parse(Session["SID"].ToString());

                    DataRow drstaff = StaffMst.GetDataByKey(staffId);
                    if (drstaff != null)
                    {
                        DataTable LeaveDT = LeaveMst.GetAllDataRecordByStId(status, int.Parse(drstaff["StdId"].ToString()));
                        GridView3.DataSource = LeaveDT;
                        GridView3.DataBind();
                    }
                }
            }
            catch
            {
            }
        }
        protected void btnsarch_Click(object sender, EventArgs e)
        {
            try
            {
                DataRow StaffDT = StaffMst.GetDataByKey(int.Parse(Session["SID"].ToString()));

                DataTable Student_dt = null;
                if (StaffDT != null && StaffDT["StdId"].ToString() != "")
                {
                    DataTable StuDT = StudentResult.GetAllResultDataByStId(int.Parse(StaffDT["StdId"].ToString()));
                    if (StuDT != null)
                    {
                        try
                        {
                            Student_dt = StuDT.Select("ExamId= " + drpExam.SelectedValue).CopyToDataTable();

                            if (Student_dt != null && Student_dt.Rows.Count > 0)
                            {
                                GvwResult.DataSource = Student_dt;
                                GvwResult.DataBind();
                            }
                        }
                        catch
                        {
                            GvwResult.DataSource = Student_dt;
                            GvwResult.DataBind();
                        }
                    }
                }
            }
            catch
            {
            }

            //else
            //{
            //    //MultiView1.ActiveViewIndex = -1;
            //}
        }
        protected void bindgrid()
        {
            try
            {
                if (Session["SID"] != null)
                {
                    int staffId = int.Parse(Session["SID"].ToString());

                    DataRow drstaff = StaffMst.GetDataByKey(staffId);
                    if (drstaff != null)
                    {
                        DataTable compdt = Complainmst.GetAllDataRecordByStId("", int.Parse(drstaff["StdId"].ToString()));
                        GridView1.DataSource = compdt;
                        GridView1.DataBind();
                        lblcomplain.Text = GridView1.Rows.Count.ToString();
                    }
                }
            }
            catch
            {
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.IsPostBack == false)
            {
                if (Session["SID"] != null)
                {
                    DataRow StaffDT = StaffMst.GetDataByKey(int.Parse(Session["SID"].ToString()));


                    if (StaffDT != null && StaffDT["StdId"].ToString() != "")
                    {
                        DataTable DivDT = DivMst.GetDataByStandardId(int.Parse(StaffDT["StdId"].ToString()));
                        lblstd.Text           = StaffDT["StdName"].ToString();
                        drpdiv.DataSource     = DivDT;
                        drpdiv.DataTextField  = "DivName";
                        drpdiv.DataValueField = "DID";
                        drpdiv.DataBind();
                        drpdiv.Items.Insert(0, "SELECT");
                        drpstudent.Items.Insert(0, "SELECT");
                    }
                }
            }
        }