Ejemplo n.º 1
0
        /// <summary>
        /// 获取其他缴费的一览json
        /// </summary>
        /// <param name="param"></param>
        /// <param name="aCharge"></param>
        /// <param name="itemCount"></param>
        /// <returns></returns>
        public List<dynamic> AnotherChargeSearch(EasyUIGridParamModel param, AnotherCharge aCharge, out int itemCount)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append(@"SELECT ac.ID, ac.CustomerName, ac.Money, ac.ActMoney, ac.ChargeDate, ac.Remark,
                                   te.Name AS OperatorName
                            FROM   T_AnotherCharge ac
                                   LEFT JOIN T_operator o
                                        ON  o.ID = ac.OperatorID
                                   LEFT JOIN T_EMPLOYEE te
                                        ON  o.EmployeeID = te.ID
                            WHERE  1 = 1 ");
            Dictionary<string, object> paramList = new Dictionary<string, object>();

            if (aCharge.Status != -1)
            {
                strSql.Append("and ac.status=@status ");
                paramList.Add("Status", aCharge.Status);
            }
            using (DBHelper db = DBHelper.Create())
            {
                itemCount = db.GetCount(strSql.ToString(), paramList);
                int pageIndex = Convert.ToInt32(param.page) - 1;
                int pageSize = Convert.ToInt32(param.rows);
                return db.GetDynaminObjectList(strSql.ToString(), pageIndex, pageSize, "ID", paramList);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(AnotherCharge model)
 {
     using (DBHelper db = DBHelper.Create())
     {
         db.Insert<AnotherCharge>(model);
     }
 }
Ejemplo n.º 3
0
 public ActionResult AnotherChargeSearch(EasyUIGridParamModel param, AnotherCharge aCharge)
 {
     int itemCount = 0;
     List<dynamic> chargeList = new AnotherChargeRule().AnotherChargeSearch(param, aCharge, out itemCount);
     var showList = from anotherCharge in chargeList
                    select new
                    {
                        ID = anotherCharge.ID,
                        CustomerName = anotherCharge.CUSTOMERNAME,
                        Money = anotherCharge.MONEY,
                        ActMoney = anotherCharge.ACTMONEY,
                        Remark = anotherCharge.REMARK,
                        ChargeDate = TimeParser.FormatDateTime(anotherCharge.CHARGEDATE),
                        OperatorName = anotherCharge.OPERATORNAME,
                        Detail = "查看详细"
                    };
     return Json(new { total = chargeList.Count, rows = showList }, JsonRequestBehavior.AllowGet);
 }
Ejemplo n.º 4
0
 public ActionResult AddAnotherCharge(AnotherCharge aCharge)
 {
     AjaxResult result = new AjaxResult();
     try
     {
         aCharge.ID = Guid.NewGuid().ToString("N");
         aCharge.OperatorID = MyTicket.CurrentTicket.UserID;
         aCharge.ChargeDate = DateTime.Now;
         new AnotherChargeRule().Add(aCharge);
         result.Success = true;
         result.Message = "收费成功。";
     }
     catch (Exception ex)
     {
         result.Success = false;
         result.Message = "收费失败:" + ex.Message;
     }
     return Json(result, JsonRequestBehavior.AllowGet);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(AnotherCharge model)
 {
     using (DBHelper db = DBHelper.Create())
     {
         db.Update<AnotherCharge>(model);
         return true;
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 获取其他缴费的一览json
 /// </summary>
 /// <param name="param"></param>
 /// <param name="itemCount"></param>
 /// <returns></returns>
 public List<dynamic> AnotherChargeSearch(EasyUIGridParamModel param, AnotherCharge aCharge, out int itemCount)
 {
     return dal.AnotherChargeSearch(param, aCharge, out itemCount);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Ajax.Model.AnotherCharge model)
 {
     return(dal.Update(model));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(Ajax.Model.AnotherCharge model)
 {
     dal.Add(model);
 }