示例#1
0
    protected void CV_ServerValidate(object source, ServerValidateEventArgs args)
    {
        CustomValidator cv = (CustomValidator)source;

        switch (cv.ID)
        {
        case "cvBinCode":
            string binCode = args.Value.Trim();
            if (TheStorageBinMgr.LoadStorageBin(binCode) != null)
            {
                ShowErrorMessage("MasterData.Location.Bin.IsExist", binCode);
                args.IsValid = false;
            }
            break;

        case "cvAreaCode":
            string areaCode = args.Value.Trim();
            if (TheStorageAreaMgr.LoadStorageArea(areaCode) == null)
            {
                ShowErrorMessage("MasterData.Location.Area.IsNotExist", areaCode);
                args.IsValid = false;
            }
            break;

        default:
            break;
        }
    }
示例#2
0
    public void InitPageParameter(CycleCount cycleCount)
    {
        this.Location = cycleCount.Location.Code;

        this.StorageBinList = new List <StorageBin>();

        if (cycleCount.Bins != null && cycleCount.Bins != string.Empty)
        {
            string[] binArr = cycleCount.Bins.Split('|');
            foreach (string bin in binArr)
            {
                StorageBin storageBin = TheStorageBinMgr.LoadStorageBin(bin);
                storageBin.IsBlank = false;
                this.StorageBinList.Add(storageBin);
            }
        }
        this.GV_List.Columns[3].Visible = cycleCount.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_CREATE;
        BindData(cycleCount.Status == BusinessConstants.CODE_MASTER_STATUS_VALUE_CREATE);
    }