public ActionResult DeleteInfo()
 {
     Business.Sys_SettlementSituation Sys_SettlementSituation = new Business.Sys_SettlementSituation();
     if (Sys_SettlementSituation.DeleteInfo(Request["ID"]))
     {
         return(Content("1"));
     }
     return(Content("0"));
 }
 public ActionResult EditInfo(Model.SettlementSituation SettlementSituation)
 {
     Business.Sys_SettlementSituation Sys_SettlementSituation = new Business.Sys_SettlementSituation();
     if (Sys_SettlementSituation.UpdateInfo(SettlementSituation))
     {
         return(Content("1"));
     }
     return(Content("0"));
 }
 public ActionResult Edit()
 {
     Business.Sys_SettlementSituation Sys_SettlementSituation = new Business.Sys_SettlementSituation();
     Model.SettlementSituation        SettlementSituation     = Sys_SettlementSituation.GetInfo(Request["ID"]);
     ViewData["GetPayTypeList"]       = GetPayTypeList(SettlementSituation.PayType);
     ViewData["GetBillTypeTypeList"]  = GetBillTypeTypeList(SettlementSituation.BillType);
     ViewData["GetIsrenewTypeList"]   = GetIsrenewTypeList(SettlementSituation.Isrenew);
     ViewData["GetWhatMonthTypeList"] = GetWhatMonthTypeList();
     return(View(SettlementSituation));
 }
        /// <summary>
        /// 分页获得数据信息
        /// </summary>
        /// <param name="limit">页码大小</param>
        /// <param name="offset">从第几条数据开始</param>
        /// <param name="UserName">用户名</param>
        /// <param name="Role">角色ID</param>
        /// <returns></returns>
        public JsonResult GetList(int offset, string CompanyName, string DutyParagraph, string WhatMonth, string Isrenew)
        {
            Business.Sys_SettlementSituation Sys_SettlementSituation = new Business.Sys_SettlementSituation();
            StringBuilder sb = new StringBuilder();

            if (!string.IsNullOrEmpty(CompanyName))
            {
                sb.Append(" and CompanyName='" + CompanyName + "'");
            }
            if (!string.IsNullOrEmpty(DutyParagraph))
            {
                sb.Append(" and DutyParagraph='" + DutyParagraph + "'");
            }
            if (!string.IsNullOrEmpty(WhatMonth))
            {
                sb.Append(" and WhatMonth='" + WhatMonth + "'");
            }
            if (!string.IsNullOrEmpty(Isrenew))
            {
                sb.Append(" and Isrenew='" + Isrenew + "'");
            }
            return(Json(new { total = Sys_SettlementSituation.GetListCount(sb.ToString()), rows = Sys_SettlementSituation.GetList(offset, sb.ToString()) }, JsonRequestBehavior.AllowGet));
        }