Exemplo n.º 1
0
 private CodeMaster GetBillSettleTerm(string billSettleTermValue)
 {
     return(TheCodeMasterMgr.GetCachedCodeMaster(BusinessConstants.CODE_MASTER_BILL_SETTLE_TERM, billSettleTermValue));
 }
Exemplo n.º 2
0
 private CodeMaster GetTimePeriodType(string statusValue)
 {
     return(TheCodeMasterMgr.GetCachedCodeMaster(BusinessConstants.CODE_MASTER_TIME_PERIOD_TYPE, statusValue));
 }
Exemplo n.º 3
0
 private CodeMaster GetStatus(string statusValue)
 {
     return(TheCodeMasterMgr.GetCachedCodeMaster(BusinessConstants.CODE_MASTER_STATUS, statusValue));
 }
Exemplo n.º 4
0
    protected void CV_ServerValidate(object source, ServerValidateEventArgs args)
    {
        CustomValidator cv = (CustomValidator)source;

        switch (cv.ID)
        {
        case "cvParCode":
            if (TheBomMgr.LoadBom(args.Value) == null)
            {
                ShowWarningMessage("MasterData.BomDetail.WarningMessage.ParCodeError", args.Value);
                args.IsValid = false;
            }
            break;

        case "cvCompCode":
            if (TheItemMgr.LoadItem(args.Value) == null)
            {
                ShowWarningMessage("MasterData.BomDetail.WarningMessage.CompCodeError", args.Value);
                args.IsValid = false;
            }
            break;

        case "cvOp":
            try
            {
                Convert.ToInt32(args.Value);
            }
            catch (Exception)
            {
                ShowWarningMessage("MasterData.BomDetail.WarningMessage.OpError");
                args.IsValid = false;
            }
            break;

        case "cvUom":
            if (TheUomMgr.LoadUom(args.Value) == null)
            {
                ShowWarningMessage("MasterData.Bom.WarningMessage.UomInvalid", args.Value);
                args.IsValid = false;
            }
            break;

        case "cvRateQty":
            try
            {
                Convert.ToDecimal(args.Value);
            }
            catch (Exception)
            {
                ShowWarningMessage("MasterData.BomDetail.WarningMessage.RateQtyError");
                args.IsValid = false;
            }
            break;

        case "cvStruType":
            if (TheCodeMasterMgr.GetCachedCodeMaster(BusinessConstants.CODE_MASTER_BOM_DETAIL_TYPE, args.Value) == null)
            {
                ShowWarningMessage("MasterData.BomDetail.WarningMessage.StruTypeError");
                args.IsValid = false;
            }
            break;

        case "cvScrapPercentage":
            try
            {
                Convert.ToDecimal(args.Value);
            }
            catch (Exception)
            {
                ShowWarningMessage("MasterData.BomDetail.WarningMessage.ScrapPercentageError");
                args.IsValid = false;
            }
            break;

        case "cvStartTime":
            try
            {
                Convert.ToDateTime(args.Value);
            }
            catch (Exception)
            {
                ShowWarningMessage("MasterData.BomDetail.WarningMessage.StartTimeError");
                args.IsValid = false;
            }
            break;

        case "cvEndTime":
            try
            {
                if (args.Value.Trim() != "")
                {
                    Convert.ToDateTime(args.Value);
                }
            }
            catch (Exception)
            {
                ShowWarningMessage("MasterData.BomDetail.WarningMessage.EndTimeError");
                args.IsValid = false;
            }
            break;

        case "cvLocation":
            if (args.Value.Trim() != "")
            {
                if (TheLocationMgr.LoadLocation(args.Value) == null)
                {
                    ShowWarningMessage("MasterData.BomDetail.WarningMessage.LocationError", args.Value);
                    args.IsValid = false;
                }
            }
            break;

        default:
            break;
        }
    }
Exemplo n.º 5
0
 private CodeMaster GetVehicleType(string vehicleType)
 {
     return(TheCodeMasterMgr.GetCachedCodeMaster(BusinessConstants.TRANSPORTATION_VEHICLE_TYPE, vehicleType));
 }
Exemplo n.º 6
0
 private CodeMaster GetorderSubType(string type)
 {
     return(TheCodeMasterMgr.GetCachedCodeMaster(BusinessConstants.CODE_MASTER_ORDER_SUB_TYPE, type));
 }