Example #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Session["total"] = (Convert.ToInt32(txt_tution.Text) + Convert.ToInt32(txt_sprt.Text) + Convert.ToInt32(txt_other.Text) + Convert.ToInt32(txt_exfrm.Text) + Convert.ToInt32(txt_exam.Text) + Convert.ToInt32(txt_lib.Text));
            txt_amnt.Text    = Session["total"].ToString();


            headsDataContext db = new headsDataContext();
            Head_detail      hd = new Head_detail();

            hd.Fee_id            = Convert.ToInt32(txt_id.Text);
            hd.Course            = DropDownList_course.Text;
            hd.sem               = Convert.ToByte(DropDownList_sem.Text);
            hd.Tution_fee        = Convert.ToDecimal(txt_tution.Text);
            hd.Sport_culture_fee = Convert.ToDecimal(txt_sprt.Text);
            hd.Other_fee         = Convert.ToDecimal(txt_other.Text);
            hd.Exam_fee          = Convert.ToDecimal(txt_exam.Text);
            hd.Exam_form_fee     = Convert.ToDecimal(txt_exfrm.Text);
            hd.Amount            = Convert.ToDecimal(txt_amnt.Text);
            hd.Library_fee       = Convert.ToDecimal(txt_lib.Text);
            db.Head_details.InsertOnSubmit(hd);


            db.SubmitChanges();
            Response.Redirect("heads.aspx");
        }
Example #2
0
        protected void btn_yes_Click(object sender, EventArgs e)
        {
            headsDataContext db = new headsDataContext();
            var qry             = from m in db.Head_details
                                  where m.Fee_id == Convert.ToInt32(Request.QueryString["id"].ToString())
                                  select m;

            foreach (var q in qry)
            {
                db.Head_details.DeleteOnSubmit(q);
            }
            db.SubmitChanges();
            Response.Redirect("heads.aspx");
        }
Example #3
0
        protected void btn_upt_Click(object sender, EventArgs e)
        {
            Session["fid"]     = id;
            Session["course"]  = crs;
            Session["semtr"]   = sem;
            Session["tuti"]    = tut;
            Session["culsprt"] = sprt;
            Session["othr"]    = other;
            Session["ex"]      = exm;
            Session["exfrm"]   = exfrm;
            Session["amnt"]    = amt;
            Session["libr"]    = lib;



            Response.Redirect("up_conf.aspx");
            db.SubmitChanges();
        }
Example #4
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            var qry = (from m in db.Head_details
                       where m.Fee_id == Convert.ToInt32(Session["fid"])
                       select m);

            foreach (var q in qry)
            {
                q.Fee_id            = Convert.ToInt32(Session["fid"]);
                q.Course            = Session["course"].ToString();
                q.sem               = Convert.ToByte(Session["semtr"]);
                q.Tution_fee        = Convert.ToDecimal(Session["tuti"]);
                q.Sport_culture_fee = Convert.ToDecimal(Session["culsprt"]);
                q.Other_fee         = Convert.ToDecimal(Session["othr"]);
                q.Exam_fee          = Convert.ToDecimal(Session["ex"]);
                q.Exam_form_fee     = Convert.ToDecimal(Session["exfrm"]);
                q.Amount            = Convert.ToDecimal(Session["amnt"]);
                q.Library_fee       = Convert.ToDecimal(Session["libr"]);
            }
            db.SubmitChanges();
            Response.Redirect("heads.aspx");
        }