示例#1
0
        public ActionResult Edit()
        {
            string orderNum = WebUtil.GetQueryStringValue <string>("orderNum", string.Empty);

            if (orderNum.IsEmpty())
            {
                return(Redirect("/Move/Product/List"));
            }
            Bill <MoveOrderEntity, MoveOrderDetailEntity> bill = new MoveOrder();
            MoveOrderEntity entity = new MoveOrderEntity();

            entity.OrderNum = orderNum;
            entity          = bill.GetOrder(entity);
            if (entity.IsNull())
            {
                return(Redirect("/Move/Product/List"));
            }
            ViewBag.Entity      = entity;
            ViewBag.Status      = EnumHelper.GetEnumDesc <EAudite>(entity.Status);
            ViewBag.MoveType    = EnumHelper.GetOptions <EMoveType>(entity.MoveType, "请选择移库类型");
            ViewBag.ProductType = EnumHelper.GetOptions <EProductType>(entity.ProductType, "请选择入库产品类型");

            MoveOrderDetailEntity detail = new MoveOrderDetailEntity();

            detail.OrderNum = orderNum;
            List <MoveOrderDetailEntity> listResult = bill.GetOrderDetail(detail);

            Session[CacheKey.TEMPDATA_CACHE_MOVERODUCTDETAIL] = listResult;
            return(View());
        }
示例#2
0
        public ActionResult Detail()
        {
            string SnNum = WebUtil.GetQueryStringValue <string>("SnNum");

            MoveOrderEntity entity = null;

            if (!SnNum.IsEmpty())
            {
                ITopClient client = new TopClientDefault();
                Dictionary <string, string> dic = new Dictionary <string, string>();

                dic.Add("CompanyID", CompanyID);
                dic.Add("SnNum", SnNum);

                string result = client.Execute(MoveApiName.MoveApiName_GetOrder, dic);
                DataResult <MoveOrderEntity> dataResult = JsonConvert.DeserializeObject <DataResult <MoveOrderEntity> >(result);
                entity = dataResult.Result;
            }
            entity         = entity.IsNull() ? new MoveOrderEntity() : entity;
            ViewBag.Entity = entity;
            return(View());
        }
示例#3
0
        public ActionResult Add()
        {
            string SnNum = WebUtil.GetQueryStringValue <string>("SnNum");

            MoveOrderEntity entity            = null;
            List <MoveOrderDetailEntity> list = null;

            if (!SnNum.IsEmpty())
            {
                ITopClient client = new TopClientDefault();
                Dictionary <string, string> dic = new Dictionary <string, string>();

                dic.Add("CompanyID", CompanyID);
                dic.Add("SnNum", SnNum);

                string result = client.Execute(MoveApiName.MoveApiName_GetOrder, dic);
                DataResult <MoveOrderEntity> dataResult = JsonConvert.DeserializeObject <DataResult <MoveOrderEntity> >(result);
                entity = dataResult.Result;

                result = client.Execute(MoveApiName.MoveApiName_GetDetail, dic);
                DataResult <List <MoveOrderDetailEntity> > dataList = JsonConvert.DeserializeObject <DataResult <List <MoveOrderDetailEntity> > >(result);
                list = dataList.Result;
            }
            if (entity.IsNull())
            {
                entity                = new MoveOrderEntity();
                entity.CreateUser     = this.LoginUser.UserNum;
                entity.CreateUserName = this.LoginUser.UserName;
                entity.CreateTime     = DateTime.Now;
            }
            ViewBag.Entity = entity;

            list = list.IsNull() ? new List <MoveOrderDetailEntity>() : list;
            Session[SessionKey.SESSION_MOVE_DETAIL] = list;

            ViewBag.MoveType = EnumHelper.GetOptions <EMoveType>(entity.MoveType);
            return(View());
        }
示例#4
0
        public ActionResult Detail()
        {
            string orderNum = WebUtil.GetQueryStringValue <string>("orderNum", string.Empty);
            string flag     = WebUtil.GetQueryStringValue <string>("flag", string.Empty);
            Bill <MoveOrderEntity, MoveOrderDetailEntity> bill = new MoveOrder();
            MoveOrderEntity entity = new MoveOrderEntity();

            entity.OrderNum   = orderNum;
            entity            = bill.GetOrder(entity);
            entity            = entity.IsNull() ? new MoveOrderEntity() : entity;
            ViewBag.BadReport = entity;
            ViewBag.Status    = EnumHelper.GetEnumDesc <EAudite>(entity.Status);

            MoveOrderDetailEntity detail = new MoveOrderDetailEntity();

            detail.OrderNum = orderNum;
            List <MoveOrderDetailEntity> listResult = bill.GetOrderDetail(detail);

            listResult     = listResult.IsNull() ? new List <MoveOrderDetailEntity>() : listResult;
            ViewBag.Detail = listResult;
            ViewBag.Flag   = flag;
            return(View());
        }