public ActionResult Save(FormCollection fc)
 {
     if (fc["accountid"] == null || fc["accountid"] == "")
     {
         Account_master t   = new Account_master();
         Boolean        res = t.InsertAccount_master(fc);
         if (res)
         {
             return(Content("Record Inserted Successfully"));
         }
         else
         {
             return(Content("Error Adding Record Try Again"));
         }
     }
     else
     {
         Account_master t   = new Account_master();
         Boolean        res = t.UpdateAccount_master(fc);
         if (res)
         {
             return(Content("Record Edited Successfully"));
         }
         else
         {
             return(Content("Error Editing Record Try Again"));
         }
     }
     //return PartialView("SaveRec");
 }
        public ActionResult Account_masterdelete(int id)
        {
            Account_master t   = new Account_master();
            Boolean        res = t.DeleteRecord(id);

            if (res)
            {
                return(Content("Record Deleted Successfully"));
            }
            else
            {
                return(Content("Error Deleting Record Try Again"));
            }
        }
        public ActionResult Account_masterlist()
        {
            int pageno = Convert.ToInt16(Request["page"]);

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

            gen.PagedList(pageno, cnt, PerPageRec, "Account_master", "Account_masterlist");
            ViewBag.pageLinks        = gen.PageNos;
            ViewData["TableHeading"] = "List Of Account_master";
            ViewData["addlink"]      = "Account_masterAdd";
            dt.TableName             = "Account_master";
            ds.Tables.Add(dt);
            return(View("listAccount_master", ds));
        }
        public JsonResult IsAvailable(String accountnumber)
        {
            Account_master d = new Account_master();

            return(Json(d.IsAvailable(accountnumber), JsonRequestBehavior.AllowGet));
        }