Exemplo n.º 1
0
        public ActionResult MoveDataIsHistory(string dateTime, string billType)
        {
            string   msg = string.Empty;
            bool     bResult;
            string   strResult = string.Empty;
            DateTime time      = Convert.ToDateTime(dateTime);

            switch (billType)
            {
            case "1":    //入库单据
                bResult = InBillMasterHistory.Add(time, out strResult);
                if (!bResult)
                {
                    msg = "入库操作:" + strResult;
                }
                break;

            case "2":    //出库单据
                bResult = OutBillMasterHistory.Add(time, out strResult);
                if (!bResult)
                {
                    msg = "出库操作:" + strResult;
                }
                break;

            case "3":    //移库单据
                bResult = MoveBillMasterHistory.Add(time, out strResult);
                if (!bResult)
                {
                    msg = "移库操作:" + strResult;
                }
                break;

            case "4":    //盘点单据
                bResult = CheckBillMasterHistory.Add(time, out strResult);
                if (!bResult)
                {
                    msg = "盘点操作:" + strResult;
                }
                break;

            case "5":    //损益单据
                bResult = ProfitLossBillMasterHistory.Add(time, out strResult);
                if (!bResult)
                {
                    msg = "损益操作:" + strResult;
                }
                break;

            case "6":    //日结
                bResult = DailyBalanceHistoryService.Add(time, out strResult);
                if (!bResult)
                {
                    msg = "出库操作:" + strResult;
                }
                break;

            default:
                msg = "调用了未定义的方法!";
                break;
            }
            return(new ContentResult()
            {
                Content = msg, ContentEncoding = Encoding.GetEncoding("GB2312"), ContentType = "text"
            });
        }