public JsonResult ShowAllVoucherType() { BL_VoucherType db = new BL_VoucherType(); return(new JsonResult { Data = db.SelectAllVoucherType(), JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public JsonResult DeleteVoucherType(int VoucherTypeID) { string val = ""; BL_VoucherType db = new BL_VoucherType(); if (db.DeleteVoucherType(VoucherTypeID)) { val = "DeliveryType Deleted Successfully"; } return(Json(val)); }
public JsonResult GetAccountID(string prefix) { KeystoneProject.Buisness_Logic.MasterFinacialAccounts.BL_VoucherType Bl_obj = new BL_VoucherType(); VoucherType AddServiceMod = new VoucherType(); DataSet ds = Bl_obj.GetAccountID(prefix, "%"); List <VoucherType> SearchList = new List <VoucherType>(); foreach (DataRow dr in ds.Tables[0].Rows) { SearchList.Add(new VoucherType { AccountName = dr["AccountName"].ToString(), MasterAcID = dr["AccountsID"].ToString(), }); } return(new JsonResult { Data = SearchList, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }