Inheritance: System.Web.Services.Protocols.SoapHttpClientProtocol
Exemplo n.º 1
0
        private void CheckAccessPermission()
        {
            #region Object Dictionary
            Dictionary<string, List<object>> dicObject = new Dictionary<string, List<object>>();
            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_RECEIVE, new List<object> { this.btnReceive, 0, Keys.D1, Keys.NumPad1 });
            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_RECEIVERETURN, new List<object> { this.btnReceiveReturn, 0, Keys.D2, Keys.NumPad2 });

            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_PICKLISTONLINE, new List<object> { this.btnPickListOnline, 1, Keys.D1, Keys.NumPad1 });
            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_PICKLIST, new List<object> { this.btnPickList, 1, Keys.D2, Keys.NumPad2 });
            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIP, new List<object> { this.btnShip, 1, Keys.D3, Keys.NumPad3 });
            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIPORDER, new List<object> { this.btnShipOrder, 1, Keys.D4, Keys.NumPad4 });
            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIPRETURN, new List<object> { this.btnShipReturn, 1, Keys.D5, Keys.NumPad5 });
            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_SHIPCONFIRM, new List<object> { this.btnShipConfirm, 1, Keys.D6, Keys.NumPad6 });

            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_TRANSFER, new List<object> { this.btnTransfer, 2, Keys.D1, Keys.NumPad1 });
            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_PUTAWAY, new List<object> { this.btnPutAway, 2, Keys.D2, Keys.NumPad2 });
            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_PICKUP, new List<object> { this.btnPickUp, 2, Keys.D3, Keys.NumPad3 });
            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_DEVANNING, new List<object> { this.btnDevanning, 2, Keys.D4, Keys.NumPad4 });
            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_STOCKTAKING, new List<object> { this.btnStockTaking, 2, Keys.D5, Keys.NumPad5 });
            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_HUSTATUS, new List<object> { this.btnHuStatus, 2, Keys.D6, Keys.NumPad6 });
            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_REUSE, new List<object> { this.btnReuse, 2, Keys.D7, Keys.NumPad7 });

            dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_INSPECTION, new List<object> { this.btnInspection, 3, Keys.D1, Keys.NumPad1 });
            //dicObject.Add(BusinessConstants.TRANSFORMER_MODULE_TYPE_INSPECT, new List<object> { this.btnInspect, 3, Keys.D2, Keys.NumPad2 });
            #endregion

            SmartDeviceMgrWS TheSmartDeviceMgr = new SmartDeviceMgrWS();
            Permission[] permissionArray = TheSmartDeviceMgr.GetUserPermissions(BusinessConstants.CODE_MASTER_PERMISSION_CATEGORY_TYPE_VALUE_TERMINAL, user.Code);

            foreach (KeyValuePair<string, List<object>> keyValuePair in dicObject)
            {
                ((Button)((keyValuePair.Value)[0])).Enabled = false;
                foreach (Permission permission in permissionArray)
                {
                    if (permission.Code == keyValuePair.Key)
                    {
                        ((Button)((keyValuePair.Value)[0])).Enabled = true;
                        dicModule.Add(keyValuePair.Key, keyValuePair.Value);
                        break;
                    }
                }
            }
        }
Exemplo n.º 2
0
        public UCBase(User user, string moduleType)
        {
            InitializeComponent();
            this.resolver = new Resolver();
            this.resolver.UserCode = user.Code;
            this.resolver.ModuleType = moduleType;
            this.lblMessage.Text = string.Empty;
            this.lblMessage.Visible = false;
            this.timerCtrl = new Timer();
            this.TheSmartDeviceMgr = new SmartDeviceMgrWS();
            this.enableCache = moduleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_PICKLIST
                            || moduleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_RECEIVE
                            //|| moduleType == BusinessConstants.TRANSFORMER_MODULE_TYPE_STOCKTAKING
                            ;
            if (this.enableCache)
            {
                this.originalResolver = new Resolver();
            }

            //
            this.timerCtrl.Tick += new System.EventHandler(this.TimerCtrl_Tick);

            //初始化表格
            columnItemCode = new DataGridTextBoxColumn();
            columnItemCode.MappingName = "ItemCode";
            columnItemCode.HeaderText = "物料";
            columnItemCode.Width = 100;

            columnUomCode = new DataGridTextBoxColumn();
            columnUomCode.MappingName = "UomCode";
            columnUomCode.HeaderText = "单位";
            columnUomCode.Width = 20;

            columnCurrentQty = new DataGridTextBoxColumn();
            columnCurrentQty.MappingName = "CurrentQty";
            columnCurrentQty.HeaderText = "数量";
            columnCurrentQty.Format = "0.##";
            columnCurrentQty.Width = 40;

            columnCartons = new DataGridTextBoxColumn();
            columnCartons.MappingName = "Cartons";
            columnCartons.HeaderText = "箱数";
            columnCartons.Width = 30;

            columnItemDescription = new DataGridTextBoxColumn();
            columnItemDescription.MappingName = "ItemDescription";
            columnItemDescription.HeaderText = "描述";
            columnItemDescription.Width = 150;

            //
            columnHuId = new DataGridTextBoxColumn();
            columnHuId.MappingName = "HuId";
            columnHuId.HeaderText = "条码";
            columnHuId.Width = 160;

            columnStorageBinCode = new DataGridTextBoxColumn();
            columnStorageBinCode.MappingName = "StorageBinCode";
            columnStorageBinCode.HeaderText = "库格";
            columnStorageBinCode.Width = 0;
            columnStorageBinCode.NullText = string.Empty;

            columnLotNo = new DataGridTextBoxColumn();
            columnLotNo.MappingName = "LotNo";
            columnLotNo.HeaderText = "批号";
            columnLotNo.Width = 0;

            columnAdjustQty = new DataGridTextBoxColumn();
            columnAdjustQty.MappingName = "AdjustQty";
            columnAdjustQty.HeaderText = "数量";
            columnAdjustQty.Format = "0.##";
            columnAdjustQty.Width = 0;
        }
Exemplo n.º 3
0
 public MainForm()
 {
     TheSmartDeviceMgr = new SmartDeviceMgrWS();
     InitializeComponent();
     LoadUCLogin();
 }