void fillpublication()
 {
     x.conopen();
     qry = "select * from pub_mster";
     dst = x.fills(qry);
     DropDownList2.DataTextField  = "pub_name";
     DropDownList2.DataValueField = "pub_id";
     DropDownList2.DataBind();
     DropDownList2.Items.Insert(0, new ListItem("--Select publication--", "0"));
     x.conclose();
 }
Ejemplo n.º 2
0
 void fillsubject()
 {
     x.conopen();
     qry = "select * from subject";
     dst = x.fills(qry);
     //DropDownList1.DataSource=dst.Tables[0];
     subject.DataTextField  = "sname";
     subject.DataValueField = "sid";
     subject.DataBind();
     subject.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select subject--", "0"));
     x.conclose();
 }
Ejemplo n.º 3
0
 void fillbook()
 {
     x.conopen();
     qry = "select distinct a.issue_id,b.first_name,c.book_name,a.issue_date,c.book_id from issue_mster a,student_mster b,book_mster c where b.enrollment_no=a.enrollment_no and a.book_id=c.book_id and a.enrollment_no='" + txt_enroll.Text + "'";
     dst = x.fills(qry);
     if (dst.Tables[0].Rows.Count > 0)
     {
         lbl_sname.Text               = dst.Tables[0].Rows[0][1].ToString();
         DropDownList1.DataSource     = dst.Tables[0];
         DropDownList1.DataTextField  = "book_name";
         DropDownList1.DataValueField = "book_id";
         DropDownList1.DataBind();
         DropDownList1.Items.Insert(0, new ListItem("--Select Book--", "0"));
     }
     else
     {
         Panel1.Visible = false;
         Label1.Text    = " You Don't Have Any Issued Book...";
     }
     x.conclose();
     //x.conopen();
     //qry = "select * from book_mster";
     //dst = x.fills(qry);
     ////DropDownList1.DataSource=dst.Tables[0];
     //DropDownList1.DataTextField = "book_name";
     //DropDownList1.DataValueField = "book_id";
     //DropDownList1.DataBind();
     //DropDownList1.Items.Insert(0, new ListItem("--Select Book--", "0"));
     //x.conclose();
 }
Ejemplo n.º 4
0
 void fillpaper()
 {
     x.conopen();
     qry = "select * from paper";
     dst = x.fills(qry);
     //DropDownList1.DataSource=dst.Tables[0];
     paper.DataTextField  = "pname";
     paper.DataValueField = "pid";
     paper.DataBind();
     paper.Items.Insert(0, new ListItem("--Select paper--", "0"));
     x.conclose();
 }
Ejemplo n.º 5
0
 void fillbook()
 {
     x.conopen();
     qry = "select distinct a.issue_id,b.first_name,c.book_name,a.issue_date,c.book_id from issue_mster a,student_mster b,book_mster c where b.enrollment_no=a.enrollment_no and a.book_id=c.book_id and a.enrollment_no='" + txt_enroll.Text + "'";
     dst = x.fills(qry);
     if (dst.Tables[0].Rows.Count > 0)
     {
         lbl_sname.Text               = dst.Tables[0].Rows[0][1].ToString();
         DropDownList1.DataSource     = dst.Tables[0];
         DropDownList1.DataTextField  = "book_name";
         DropDownList1.DataValueField = "book_id";
         DropDownList1.DataBind();
         DropDownList1.Items.Insert(0, new ListItem("--Select Book--", "0"));
         //idate=dst.Tables[0].Rows[0][3].ToString();
         //diff = dt - Convert.ToDateTime(idate);
         // var days = diff.TotalDays;
         //lbl_days.Text = Convert.ToString(days);
         //lbl_issuedate.Text = idate.ToString();
         //x.conclose();
         //x.conopen();
         //qry = "select * from  issue_mster where enrollment_no=" + txt_enroll.Text ;
         //dr = x.search(qry);
         //dr.Read();
         //DateTime rdate = Convert.ToDateTime(dr[5].ToString());
         //TimeSpan differ = dt - rdate;
         //double day = differ.TotalDays;
         //if (day < 7)
         //{
         //    lbl_panalty.Text = "NO";
         //}
         //else
         //{
         //    lbl_panalty.Text = "YES";
         //}
     }
     else
     {
         Panel1.Visible = false;
         Label1.Text    = "You Don't Have Any Issued Book...";
     }
     x.conclose();
 }
 void fillbook()
 {
     x.conopen();
     qry = "select l.lost_id,s.first_name,b.book_name,b.book_id from book_lost l,student_mster s,book_mster b where l.usn_no=s.usn_no and l.book_id=b.book_id and l.usn_no='" + txt_enroll.Text + "'";
     dst = x.fills(qry);
     if (dst.Tables[0].Rows.Count > 0)
     {
         lbl_sname.Text               = dst.Tables[0].Rows[0][1].ToString();
         DropDownList1.DataSource     = dst.Tables[0];
         DropDownList1.DataTextField  = "book_name";
         DropDownList1.DataValueField = "book_id";
         DropDownList1.DataBind();
         DropDownList1.Items.Insert(0, new ListItem("--Select Book--", "0"));
     }
     else
     {
         Panel1.Visible = false;
         Label1.Text    = " You Don't Have Any Lost Book";
     }
 }