Exemple #1
0
 public void Bindfranchdata()
 {
     if (Session["Franchisee"] != null && Session["Franchisee"] != "")
     {
         DataTable dtf = new DataTable();
         dtf = objsql.GetTable("select * from tblteacher where centercode='" + Session["Franchisee"] + "'");
         GrdDetail.DataSource = dtf;
         GrdDetail.DataBind();
         foreach (GridViewRow gr in GrdDetail.Rows)
         {
             Label    lbldob    = (Label)gr.FindControl("lbldob");
             string[] allvalues = new string[3];
             allvalues   = lbldob.Text.Split("/".ToCharArray());
             lbldob.Text = allvalues[1].Trim() + "/" + allvalues[0].Trim() + "/" + allvalues[2].Trim();
         }
     }
     if (Session["Admin"] != null && Session["Admin"] != "")
     {
         DataTable dt = new DataTable();
         dt = objsql.GetTable("select * from FranchiseeDetails");
         ddlfranchisee.DataSource     = dt;
         ddlfranchisee.DataTextField  = "CenterName";
         ddlfranchisee.DataValueField = "centercode";
         ddlfranchisee.DataBind();
         ddlfranchisee.Items.Insert(0, new ListItem("select franchisee"));
     }
 }
Exemple #2
0
 protected void GrdDetail_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     GrdDetail.PageIndex = e.NewPageIndex;
     BindData();
     GrdDetail.DataBind();
     //listFilter = BindName();
 }
    protected void bind()
    {
        timecheck = "";
        if (Session["Admin"] != "")
        {
            dt = objsql.GetTable("select distinct s.id,s.rollno,s.name,s.fathername,s.phone,f.alertdate,d.coursename,c.courseid from tblstudentdata s , student_course c ,fees_master f,course d where c.CourseId=f.CourseId and f.courseid=d.courseid and s.rollno=f.RollNo and s.status='1' and (convert(datetime, f.[AlertDate], 120) <= convert(datetime,'" + System.DateTime.Now.ToString("MM/dd/yyyy") + "', 120))");
        }
        else
        {
            dt = objsql.GetTable("select distinct s.id,s.rollno,s.name,s.fathername,s.phone,f.alertdate,d.coursename,c.courseid from tblstudentdata s , student_course c ,fees_master f,course d where c.CourseId=f.CourseId and f.courseid=d.courseid and s.rollno=f.RollNo and s.status='1' and (convert(datetime, f.[AlertDate], 120) <= convert(datetime,'" + System.DateTime.Now.ToString("MM/dd/yyyy") + "', 120))");
        }
        if (dt.Rows.Count > 0)
        {
            GrdDetail.DataSource = dt;
            GrdDetail.DataBind();
        }
        string    datex = System.DateTime.Now.AddDays(5).ToString("MM/dd/yyyy");
        DataTable dtall = new DataTable();

        dtall = objsql.GetTable("select distinct s.id,s.rollno,s.name,s.fathername,s.phone,c.coursename,c.courseid,c.enddate from tblstudentdata s , student_course c  where  s.rollno=c.RollNo and s.status='1' and c.status='1' and (convert(datetime, c.[enddate], 120) <= convert(datetime,'" + datex + "' , 120))");
        if (dtall.Rows.Count > 0)
        {
            GridView2.DataSource = dtall;
            GridView2.DataBind();
        }
    }
Exemple #4
0
    protected void btnsearch_Click(object sender, EventArgs e)
    {
        DataTable dtf = new DataTable();

        dtf = objsql.GetTable("select * from tblteacher where centercode='" + ddlfranchisee.SelectedItem.Value + "'");
        GrdDetail.DataSource = dtf;
        GrdDetail.DataBind();
    }
    protected void BindStudentCourse()
    {
        //dtNew = objsql.GetTable("SELECT * FROM Student_Course  where RollNo='"+RollNo+"'");
        //GrdDetail.DataSource = dtNew;
        //GrdDetail.DataBind();

        DataTable dtNew = new DataTable();

        DataTable dt1 = new DataTable();
        string    rn  = objsql.GetSingleValue("Select rollno from tblstudentdetail where centercode='" + lblcode.Text + "' and id =" + Cache["id"].ToString()).ToString();

        RollNo = objsql.GetSingleValue("Select rollno from tblstudentdetail where centercode='" + lblcode.Text + "' and id =" + Cache["id"].ToString()).ToString();

        dt1 = objsql.GetTable("select s.id,s.RollNo,s.CourseId,s.CourseName,s.Time,s.Status,s.Admitdate,s.StartDate,s.CenterCode,s.Type,s.Active,t.teachername from Student_Course s,tblteacher t where s.RollNo='" + RollNo + "' and s.CenterCode='" + lblcode.Text + "' and t.teachercode=s.teachercode and s.course_complete='0' order by s.Time");

        dtNew.Columns.Add(new DataColumn("id", typeof(int)));
        dtNew.Columns.Add(new DataColumn("RollNo", typeof(string)));

        dtNew.Columns.Add(new DataColumn("CourseName", typeof(string)));
        dtNew.Columns.Add(new DataColumn("Time", typeof(string)));
        dtNew.Columns.Add(new DataColumn("Status", typeof(string)));
        dtNew.Columns.Add(new DataColumn("AdmitDate", typeof(string)));
        dtNew.Columns.Add(new DataColumn("StartDate", typeof(string)));
        dtNew.Columns.Add(new DataColumn("Type", typeof(string)));
        dtNew.Columns.Add(new DataColumn("Teachercode", typeof(string)));
        dtNew.Columns.Add(new DataColumn("Active", typeof(string)));
        dtNew.Columns.Add(new DataColumn("CourseId", typeof(string)));

        if (dt1.Rows.Count > 0)
        {
            // int Timeid=0;
            string Time = "", Timeid = "";
            foreach (DataRow dr in dt1.Rows)
            {
                // Timeid=Convert.ToInt32(dr[4]);
                Timeid = dr[4].ToString();
                Time   = Common.Get(objsql.GetSingleValue("select Time from Batch_Timming where id=" + Timeid));

                DataRow dr1 = dtNew.NewRow();
                dr1["id"]          = Convert.ToInt32(dr[0]);
                dr1["RollNo"]      = dr[1].ToString();
                dr1["CourseName"]  = dr[3].ToString();
                dr1["Type"]        = dr[9].ToString();
                dr1["Time"]        = Time;
                dr1["Status"]      = dr[5].ToString();
                dr1["AdmitDate"]   = dr[6].ToString();
                dr1["StartDate"]   = dr[7].ToString();
                dr1["Teachercode"] = dr[11].ToString();
                dr1["Active"]      = dr[10].ToString();
                dr1["CourseId"]    = dr[2].ToString();
                dtNew.Rows.Add(dr1);
            }
        }

        GrdDetail.DataSource = dtNew;
        GrdDetail.DataBind();
    }
    protected void bindresult()
    {
        DataTable dt = new DataTable();

        dt = objsql.GetTable("  select distinct c.RollNo,s.name,s.fname,c.CourseId,r.Place  from Student_Certificates c , tblstudentdetail s,Result r where c.RollNo=s.rollno");
        if (dt.Rows.Count > 0)
        {
            GrdDetail.DataSource = dt;
            GrdDetail.DataBind();
        }
    }
Exemple #7
0
    public void BindStudent()
    {
        DataSet ds = new DataSet();

        //ds = objsql.GetDataset("select st.name,st.fname,st.Id,sc.CourseName,sc.Time,s.RollNo,s.TotalFees,s.CourseId,s.Date,s.Pending_Fees,s.TotalPaidFees,m.PaidFees,s.instalmentamount,s.noofinstalment,s.discount from Student_Fee s,Fees_Master m,tblstudentdata st,Student_Course sc where s.RollNo=m.RollNo and s.RollNo=st.rollno and s.RollNo=sc.RollNo and s.RollNo='"+ RollNo +"' ");
        ds = objsql.GetDataset(" select f.id as fid,r.id,r.rollno,r.particular,r.amount as paid,r.courseid,r.active,r.date,r.oldreceiptno,r.ReciptNo,m.totalfees,r.cancelauthorisation,f.discount,r.tokenno,f.fromdate,f.todate ,f.pending_fees_alert,f.pending_fees,f.totalpaidfees from Recipt_Details r , Fees_Master m,student_fee f  where r.rollno='" + RollNo + "' and r.courseid=m.courseid  and m.rollno=r.rollno and f.token=r.tokenno order by r.date asc");
        if (ds.Tables[0].Rows.Count > 0)
        {
            GrdDetail.DataSource = ds;
            GrdDetail.DataBind();
            coursetype();
        }
    }
Exemple #8
0
    public void Binddata()
    {
        DataTable dt = new DataTable();

        dt = objsql.GetTable("select * from tblteacher");
        GrdDetail.DataSource = dt;
        GrdDetail.DataBind();
        foreach (GridViewRow gr in GrdDetail.Rows)
        {
            Label    lbldob    = (Label)gr.FindControl("lbldob");
            string[] allvalues = new string[3];
            allvalues   = lbldob.Text.Split("/".ToCharArray());
            lbldob.Text = allvalues[1].Trim() + "/" + allvalues[0].Trim() + "/" + allvalues[2].Trim();
        }
    }
Exemple #9
0
    protected void BindStudentCourse()
    {
        //dtNew = objsql.GetTable("SELECT * FROM Student_Course  where RollNo='"+RollNo+"'");
        //GrdDetail.DataSource = dtNew;
        //GrdDetail.DataBind();

        DataTable dtNew = new DataTable();

        DataTable dt1 = new DataTable();


        dt1 = objsql.GetTable("select * from student_course where rollno='" + RollNo + "'");


        if (dt1.Rows.Count > 0)
        {
            GrdDetail.DataSource = dt1;
            GrdDetail.DataBind();
        }
    }
Exemple #10
0
    protected void ddlcourse_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataSet ds1 = new DataSet();

        //ds = objsql.GetDataset("select st.name,st.fname,st.Id,sc.CourseName,sc.Time,s.RollNo,s.TotalFees,s.CourseId,s.Date,s.Pending_Fees,s.TotalPaidFees,m.PaidFees,s.instalmentamount,s.noofinstalment,s.discount from Student_Fee s,Fees_Master m,tblstudentdata st,Student_Course sc where s.RollNo=m.RollNo and s.RollNo=st.rollno and s.RollNo=sc.RollNo and s.RollNo='"+ RollNo +"' ");
        ds1 = objsql.GetDataset("select r.id,r.rollno,r.particular,r.amount as paid,r.courseid,r.active,m.discount,r.date,r.oldreceiptno,r.ReciptNo,m.totalfees from Recipt_Details r , Fees_Master m  where r.rollno='" + RollNo + "' and r.courseid=m.courseid and r.courseid='" + ddlcourse.SelectedItem.Value + "' and m.rollno=r.rollno");
        if (ds1.Tables[0].Rows.Count > 0)
        {
            GrdDetail.DataSource = ds1;
            GrdDetail.DataBind();
        }
        else
        {
            lbltotal2.Text  = "0";
            lbldisc.Text    = "";
            lblpaid.Text    = "0";
            lblpending.Text = "0";
            BindStudent();
        }
        check();
    }
    protected void BindStudentCourse()
    {
        //dtNew = objsql.GetTable("SELECT * FROM Student_Course  where RollNo='"+RollNo+"'");
        //GrdDetail.DataSource = dtNew;
        //GrdDetail.DataBind();

        DataTable dtNew = new DataTable();

        DataTable dt1 = new DataTable();

        rn     = objsql.GetSingleValue("Select rollno from tblstudentdata where  id =" + Cache["id"].ToString()).ToString();
        RollNo = objsql.GetSingleValue("Select rollno from tblstudentdata where  id =" + Cache["id"].ToString()).ToString();

        dt1 = objsql.GetTable("select * from student_course where rollno='" + RollNo + "'");


        if (dt1.Rows.Count > 0)
        {
            GrdDetail.DataSource = dt1;
            GrdDetail.DataBind();
        }
    }
Exemple #12
0
    protected void btnsubmit_Click(object sender, EventArgs e)
    {
        DataTable dt2 = new DataTable();

        try
        {
            if (ddlCourse.SelectedIndex != 0 && ddltime.SelectedIndex == 0)
            {
                dt2 = objsql.GetTable("select distinct s.id,s.rollno,s.name,s.fname,s.contact,c.CourseName,c.CourseId,f.TotalFees,f.PaidFees,f.AlertDate,cc.instalment_amount as paid from tblstudentdetail s, Fees_Master f,Student_Course c, Batch_Timming b,Course cc where c.CourseId=f.CourseId and s.rollno=f.RollNo  and (convert(datetime, f.[AlertDate], 120) <= convert(datetime,'" + System.DateTime.Now.ToShortDateString() + "' , 120))  and s.Activate='1' and c.CenterCode='" + lblcode.Text + "' and cc.CourseId=c.CourseId and c.CourseId='" + courseid + "' and c.Active='1'and f.TotalFees!=f.PaidFees and f.Status='1'");
            }
            else if (ddltime.SelectedIndex != 0 && ddlCourse.SelectedIndex == 0)
            {
                GrdDetail.DataSource = null;
                GrdDetail.DataBind();
                dt2.Clear();
                timecheck = "";
                timecheck = ddltime.SelectedItem.Value;
                dt2       = objsql.GetTable("select distinct s.id,s.rollno,s.name,s.fname,s.contact,c.CourseName,c.CourseId,f.TotalFees,f.PaidFees,f.AlertDate,cc.instalment_amount as paid from tblstudentdetail s, Fees_Master f,Student_Course c, Batch_Timming b,Course cc where c.CourseId=f.CourseId and s.rollno=f.RollNo  and (convert(datetime, f.[AlertDate], 120) <= convert(datetime,'" + System.DateTime.Now.ToShortDateString() + "' , 120))  and s.Activate='1' and c.CenterCode='" + lblcode.Text + "' and cc.CourseId=c.CourseId and  c.time='" + ddltime.SelectedItem.Value + "' and c.Active='1'and f.TotalFees!=f.PaidFees and f.Status='1'");
            }
            else if (ddltime.SelectedIndex != 0 && ddlCourse.SelectedIndex != 0)
            {
                dt2 = objsql.GetTable("select distinct s.id,s.rollno,s.name,s.fname,s.contact,c.CourseName,c.CourseId,f.TotalFees,f.PaidFees,f.AlertDate,cc.instalment_amount as paid from tblstudentdetail s, Fees_Master f,Student_Course c, Batch_Timming b,Course cc where c.CourseId=f.CourseId and s.rollno=f.RollNo  and (convert(datetime, f.[AlertDate], 120) <= convert(datetime,'" + System.DateTime.Now.ToShortDateString() + "' , 120))  and s.Activate='1' and c.CenterCode='" + lblcode.Text + "' and cc.CourseId=c.CourseId and c.CourseId='" + courseid + "' and  c.time='" + ddltime.SelectedItem.Value + "' and c.Active='1'and f.TotalFees!=f.PaidFees and f.Status='1'");
            }
        }
        catch (Exception)
        {
            throw;
        }
        finally
        {
            GrdDetail.PagerSettings.Visible = false;
            GrdDetail.PageSize   = 500;
            GrdDetail.DataSource = dt2;
            GrdDetail.DataBind();
        }
    }
Exemple #13
0
 protected void GrdDetail_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     GrdDetail.PageIndex = e.NewPageIndex;
     Binddata();
     GrdDetail.DataBind();
 }