using dccdc.BLL; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using static dccdc.Controllers.DictionariesController; namespace dccdc.Controllers { public class Charge2Controller : Controller { // GET: Charge2 public ActionResult Index() { ViewBag.jfbmD = new SelectList(new ERPBuMenBll().GetAllList(""), "bumenname", "bumenname", (Session["loginUser"] as Models.ERPUser).Department); ViewBag.jffs = new SelectList(new List { new Droplist { Value = "现金", Title = "现金" }, new Droplist { Value = "转账", Title = "转账" }, new Droplist { Value = "医保卡", Title = "医保卡" } }, "Value", "Title"); return View(); } public ActionResult getSFXMData(string id, string sfxm) { var bll = new ChargeProjectMaintainBll(); var result = bll.GetAllList2(id, sfxm); return Json(new { Rows = result }); } public JsonResult getFJX(string id) { var bll = new BLL.ChargeProjectMaintainBll(); List ctList = bll.getAddList(id); return Json(ctList); } public ActionResult getCharge(string start, string end,string tm) { if (string.IsNullOrEmpty(start) || string.IsNullOrEmpty(end)) return Json(null); var bll = new chargeBll(); var result = bll.GetAllList3(start, end,tm, (Session["loginUser"] as Models.ERPUser).TrueName); return Json(new { Rows = result }); } public bool opSave(string jfdw, string jfbm, string jffs, string ysje,string items,string jdbm) { if (string.IsNullOrEmpty(jfdw) || string.IsNullOrEmpty(items)) return false; try { var bll = new chargeBll(); var result = bll.opSave(jfdw, jfbm, jffs, ysje, items,(Session["loginUser"] as Models.ERPUser).TrueName,jdbm);// Session["loginUser"] as Models.ERPUser return result; } catch(Exception ex) { log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType).Info(ex.Message, ex); return false; } } } }