Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Settlement(string id)
        {
            CSettlement CST = new CSettlement();

            CST.StrCID        = id;
            CST.StrDebtAmount = ContractMan.getNewDebtAmount(id);
            if (CST.StrDebtAmount == 0)
            {
                CST.StrIsDebt = 0;
            }
            else
            {
                CST.StrIsDebt = 1;
            }
            return(View(CST));
        }
Пример #2
0
        public ActionResult SettlementPro(string id)
        {
            string[]    arr = id.Split('@');
            CSettlement CST = new CSettlement();

            ViewData["PID"]   = arr[1];
            CST.StrCID        = arr[0];
            CST.StrDebtAmount = ContractMan.getNewDebtAmountPro(arr[0]);
            if (CST.StrDebtAmount == 0)
            {
                CST.StrIsDebt = 0;
            }
            else
            {
                CST.StrIsDebt = 1;
            }
            return(View(CST));
        }
Пример #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="CST"></param>
 /// <returns></returns>
 public ActionResult InsertSettlement(CSettlement CST)
 {
     if (ModelState.IsValid)
     {
         Acc_Account account = GAccount.GetAccountInfo();
         CST.StrCreateUser = account.UserID.ToString();
         CST.StrCreateTime = DateTime.Now;
         string strErr = "";
         if (ContractMan.InsertNewSettlement(CST, ref strErr) == true)
         {
             return(Json(new { success = "true", Msg = "保存成功" }));
         }
         else
         {
             return(Json(new { success = "false", Msg = "保存出错" + "/" + strErr }));
         }
     }
     else
     {
         //如果有错误,继续输入信息
         return(Json(new { success = "false", Msg = "数据验证不通过" }));
     }
 }