Esempio n. 1
0
 public ActionResult Save(FormCollection fc)
 {
     if (fc["id"] == null || fc["id"] == "")
     {
         Billtype_details t   = new Billtype_details();
         Boolean          res = t.InsertBilltype_details(fc);
         if (res)
         {
             return(Content("Record Inserted Successfully"));
         }
         else
         {
             return(Content("Error Adding Record Try Again"));
         }
     }
     else
     {
         Billtype_details t   = new Billtype_details();
         Boolean          res = t.UpdateBilltype_details(fc);
         if (res)
         {
             return(Content("Record Edited Successfully"));
         }
         else
         {
             return(Content("Error Editing Record Try Again"));
         }
     }
     //return PartialView("SaveRec");
 }
Esempio n. 2
0
        public ActionResult Billtype_detailsdelete(int id)
        {
            Billtype_details t   = new Billtype_details();
            Boolean          res = t.DeleteRecord(id);

            if (res)
            {
                return(Content("Record Deleted Successfully"));
            }
            else
            {
                return(Content("Error Deleting Record Try Again"));
            }
        }
Esempio n. 3
0
        public ActionResult GetBillDetails()
        {
            int     billtypeid = Convert.ToInt16(Request["billid"]);
            DataSet ds         = new DataSet();

            String[] tblheader = { "Sl.no", "Type", "Acct.Head", "Db", "Cr", "Action" };
            ViewBag.tblheader = tblheader;
            Billtype_details det = new Billtype_details();
            DataTable        dt  = det.GetOrderedRecordsbilltype(billtypeid, "id");

            ds.Tables.Add(dt);
            Session["datatable"] = dt;
            ViewBag.TotatDb      = totaldbcr("DB", dt);
            ViewBag.TotalCr      = totaldbcr("CR", dt);
            return(PartialView("GetBillDetails", dt));
        }
Esempio n. 4
0
        public ActionResult GetBillDetails()
        {
            String[] tblheader = { "S.no", "trtype", "accountnumber", "dramount", "cramount", "Actions" };
            ViewBag.tblheader = tblheader;
            Billtype_details btypdet = new Billtype_details();
            DataTable        dt      = btypdet.GetOrderedRecords(1, 100, 1, "id");

            //dt.Columns.Add("slno");
            //for (int i = 0; i < dt.Rows.Count; i++) { dt.Rows[i]["slno"] = i+1; }
            Session["billdetails"] = dt;
            DataTable newdt = (DataTable)Session["billdetails"];

            //DataSet ds = new DataSet(); ds.Tables.Add(newdt);
            ViewBag.totcr = totvalues("CR", newdt);
            ViewBag.totdr = totvalues("DR", newdt);
            return(PartialView("GetBillDetails", newdt));
        }
Esempio n. 5
0
        public ActionResult Billtype_detailslist(int id)
        {
            int pageno = Convert.ToInt16(Request["page"]);

            GenHelper.pager  gen = new GenHelper.pager();
            Billtype_details obj = new Billtype_details();
            DataSet          ds  = new DataSet();
            DataTable        dt  = obj.GetOrderedRecords(pageno, PerPageRec, id, "id desc");
            Int32            cnt = obj.GetOrderedRecordsCount("id desc");

            gen.PagedList(pageno, cnt, PerPageRec, "Billtype_details", "Billtype_detailslist");
            ViewBag.pageLinks        = gen.PageNos;
            ViewData["TableHeading"] = "List Of Billtype_details";
            ViewData["addlink"]      = "Billtype_detailsAdd";
            dt.TableName             = "Billtype_details";
            ds.Tables.Add(dt);
            return(View("listBilltype_details", ds));
        }