Exemple #1
0
        public ActionResult Add()
        {
            string         StorageNum = WebUtil.GetQueryStringValue <string>("StorageNum");
            string         LocalNum   = WebUtil.GetQueryStringValue <string>("SnNum", string.Empty);
            LocationEntity entity     = null;
            ITopClient     client     = new TopClientDefault();

            if (!LocalNum.IsEmpty())
            {
                Dictionary <string, string> dic = new Dictionary <string, string>();
                dic.Add("CompanyID", CompanyID);
                dic.Add("LocalNum", LocalNum);

                string result = client.Execute(LocationApiName.LocationApiName_Single, dic);
                DataResult <LocationEntity> dataResult = JsonConvert.DeserializeObject <DataResult <LocationEntity> >(result);
                entity = dataResult.Result;
            }

            entity            = entity.IsNull() ? new LocationEntity() : entity;
            ViewBag.Entity    = entity;
            entity.StorageNum = entity.StorageNum.IsEmpty() ? StorageNum : entity.StorageNum;
            ViewBag.LocalType = EnumHelper.GetOptions <ELocalType>(entity.LocalType);
            ViewBag.Storage   = DropDownHelper.GetStorage(entity.StorageNum, this.CompanyID);
            return(View());
        }
Exemple #2
0
        public ActionResult Add()
        {
            string        SnNum  = WebUtil.GetQueryStringValue <string>("SnNum", string.Empty);
            ProductEntity entity = null;
            ITopClient    client = new TopClientDefault();

            if (!SnNum.IsEmpty())
            {
                Dictionary <string, string> dic = new Dictionary <string, string>();
                dic.Add("CompanyID", CompanyID);
                dic.Add("SnNum", SnNum);

                string result = client.Execute(ProductApiName.ProductApiName_Single, dic);
                DataResult <ProductEntity> dataResult = JsonConvert.DeserializeObject <DataResult <ProductEntity> >(result);
                entity = dataResult.Result;
            }

            entity         = entity.IsNull() ? new ProductEntity() : entity;
            ViewBag.Entity = entity;

            ViewBag.Unit    = DropDownHelper.GetUnit(entity.UnitNum, this.CompanyID);
            ViewBag.Cate    = DropDownHelper.GetCate(entity.CateNum, this.CompanyID);
            ViewBag.Storage = DropDownHelper.GetStorage(entity.StorageNum, this.CompanyID);
            return(View());
        }
Exemple #3
0
        public ActionResult List()
        {
            string SnNum = WebUtil.GetQueryStringValue <string>("SnNum");

            ViewBag.Storage = DropDownHelper.GetStorage(SnNum, this.CompanyID);

            return(View());
        }
Exemple #4
0
 public ActionResult Dialog()
 {
     ViewBag.LocalType = EnumHelper.GetOptions <ELocalType>(0);
     ViewBag.Storage   = DropDownHelper.GetStorage(this.DefaultStorageNum, this.CompanyID);
     return(View());
 }
Exemple #5
0
 public ActionResult InventoryBook()
 {
     ViewBag.StorageNum = DropDownHelper.GetStorage(string.Empty, this.CompanyID);
     return(View());
 }
Exemple #6
0
 public ActionResult SaleLocation()
 {
     ViewBag.StorageNum = DropDownHelper.GetStorage(string.Empty, this.CompanyID);
     return(View());
 }