Ejemplo n.º 1
0
        public ActionResult CopyDeliverPlan(string id)
        {
            //复制计划
            string strErrText;
            PlanSystem plan = new PlanSystem();
            long nPlanId = plan.CopyDeliverPlan(long.Parse(id), LoginAccountId, LoginStaffName, out strErrText);
            if (nPlanId == 0)
            {
                throw new Exception(strErrText);
            }

            //读取计划
            DeliverPlan data = plan.LoadDeliverPlan(nPlanId, LoginAccountId, LoginStaffName, out strErrText);
            if (data == null)
            {
                throw new Exception(strErrText);
            }

            if (data.PlanType == InnoSoft.LS.Resources.Options.PaperPlan)
            {
                return RedirectToAction("ModifyPaperPlan", new { id = nPlanId });
            }
            else if (data.PlanType == InnoSoft.LS.Resources.Options.NotDeliverPaperPlan)
            {
                return RedirectToAction("ModifyNotDeliverPaperPlan", new { id = nPlanId });
            }
            else if (data.PlanType == InnoSoft.LS.Resources.Options.CanPlan)
            {
                return RedirectToAction("ModifyCanPlan", new { id = nPlanId });
            }
            else if (data.PlanType == InnoSoft.LS.Resources.Options.NotDeliverCanPlan)
            {
                return RedirectToAction("ModifyNotDeliverCanPlan", new { id = nPlanId });
            }
            else if (data.PlanType == InnoSoft.LS.Resources.Options.NoodlePlan)
            {
                return RedirectToAction("ModifyNoodlePlan", new { id = nPlanId });
            }
            else
            {
                return RedirectToAction("ModifyOtherPlan", new { id = nPlanId });
            }
        }