Пример #1
0
        protected void btnGo_Click(object sender, EventArgs e)
        {
            try
            {
                EWA_Common objEWA = new EWA_Common();
                BL_Common  objBL  = new BL_Common();
                objEWA.OrgId    = ddlorganization.SelectedValue;//Session["OrgId"].ToString();
                objEWA.BranchId = ddlBranch.SelectedValue.ToString();
                objEWA.CourseId = ddlCourse.SelectedValue.ToString();
                objEWA.ClassId  = ddlClass.SelectedValue.ToString();
                objEWA.date     = txtDate.Text; // Convert.ToDateTime((Convert.ToDateTime(txtDate.Text.ToString()).ToShortDateString())).ToString("dd/MM/yyyy");

                DataSet ds = objBL.BindStudentAttendance_BL(objEWA);

                if (ds.Tables[0].Rows.Count > 0)
                {
                    grdStudentAtten.DataSource = ds;
                    grdStudentAtten.DataBind();
                    //grdStudentAtten.ControlStyle.Width  = 90;
                    //grdStudentAtten.CellPadding = 20;
                }
                else
                {
                    grdStudentAtten.DataSource = ds;
                    grdStudentAtten.DataBind();
                    GeneralErr("No Record Present...!");
                }
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message.ToString());
            }
        }