public static FuelCorrectionObject FuelRowToObject(DataRow Fuel)
        {
            FuelCorrectionObject obj = new FuelCorrectionObject();

            try
            {
                if (Fuel != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(Fuel, FuelCorrectionObject.FUELCOR_ID, false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.FuelCorID           = RowFunctions.GetValueFromRowToGuid(Fuel, FuelCorrectionObject.FUELCOR_ID, true, DataRowVersion.Current);
                        obj.DateFrom            = RowFunctions.GetValueFromRowToString(Fuel, FuelCorrectionObject.DATE_FROM, false, DataRowVersion.Current);
                        obj.DateTo              = RowFunctions.GetValueFromRowToString(Fuel, FuelCorrectionObject.DATE_TO, false, DataRowVersion.Current);
                        obj.Quantity            = RowFunctions.GetValueFromRowToDecimal(Fuel, FuelCorrectionObject.QUANTITY, false, DataRowVersion.Current);
                        obj.MaxQuantity         = RowFunctions.GetValueFromRowToDecimal(Fuel, FuelCorrectionObject.MAXQUANTITY, false, DataRowVersion.Current);
                        obj.VehiclesNotIncluded = RowFunctions.GetValueFromRowToString(Fuel, FuelCorrectionObject.VEHICLES_NOT_INCLUDED, false, DataRowVersion.Current);
                        obj.SuppliersIncluded   = RowFunctions.GetValueFromRowToString(Fuel, FuelCorrectionObject.SUPPLIERS_INCLUDED, false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
        public static MaterialRevisionObject MaterialRevisionRowToObject(DataRow MaterialRevision)
        {
            MaterialRevisionObject obj = new MaterialRevisionObject();

            try
            {
                if (MaterialRevision != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(MaterialRevision, MaterialRevisionObject.MATREV_ID, false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.MatRevID    = RowFunctions.GetValueFromRowToGuid(MaterialRevision, MaterialRevisionObject.MATREV_ID, true, DataRowVersion.Current);
                        obj.Maintenance = MaintenanceConvertor.MaintenanceRowToObject(MaterialRevision);
                        obj.Revision    = RowFunctions.GetValueFromRowToString(MaterialRevision, MaterialRevisionObject.REVISION, false, DataRowVersion.Current);
                        obj.Answer      = RowFunctions.GetValueFromRowToString(MaterialRevision, MaterialRevisionObject.ANSWER, false, DataRowVersion.Current);
                        obj.Category    = RowFunctions.GetValueFromRowToString(MaterialRevision, MaterialRevisionObject.CATEGORY, false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
        public static ScheduleObject ScheduleRowToObject(DataRow schedule)
        {
            ScheduleObject obj = new ScheduleObject();

            try
            {
                if (schedule != null)
                {
                    obj.SchedID   = RowFunctions.GetValueFromRowToGuid(schedule, ScheduleObject.SCHED_ID, true, DataRowVersion.Current);
                    obj.Frequency = (Enumeration.Frequency.TimeFrequency)RowFunctions.GetValueFromRowToInteger(schedule, ScheduleObject.FREQUENCY, true, DataRowVersion.Current);
                    obj.Monday    = RowFunctions.GetValueFromRowToBoolean(schedule, ScheduleObject.MONDAY, true, DataRowVersion.Current);
                    obj.Tuesday   = RowFunctions.GetValueFromRowToBoolean(schedule, ScheduleObject.TUESDAY, true, DataRowVersion.Current);
                    obj.Wednesday = RowFunctions.GetValueFromRowToBoolean(schedule, ScheduleObject.WEDNESDAY, true, DataRowVersion.Current);
                    obj.Thursday  = RowFunctions.GetValueFromRowToBoolean(schedule, ScheduleObject.THURSDAY, true, DataRowVersion.Current);
                    obj.Friday    = RowFunctions.GetValueFromRowToBoolean(schedule, ScheduleObject.FRIDAY, true, DataRowVersion.Current);
                    obj.Saterday  = RowFunctions.GetValueFromRowToBoolean(schedule, ScheduleObject.SATERDAY, true, DataRowVersion.Current);
                    obj.Sunday    = RowFunctions.GetValueFromRowToBoolean(schedule, ScheduleObject.SUNDAY, true, DataRowVersion.Current);
                    obj.StartDate = RowFunctions.GetValueFromRowToString(schedule, ScheduleObject.STARTDATE, true, DataRowVersion.Current);
                    obj.Time      = RowFunctions.GetValueFromRowToString(schedule, ScheduleObject.TIME, true, DataRowVersion.Current);
                    obj.LastSend  = RowFunctions.GetValueFromRowToString(schedule, ScheduleObject.LAST_SEND, true, DataRowVersion.Current);
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Exemple #4
0
        public static TaskObject TaskRowToObject(DataRow task)
        {
            TaskObject obj = new TaskObject();

            try
            {
                if (task != null)
                {
                    obj.TaskID       = RowFunctions.GetValueFromRowToGuid(task, TaskObject.TASK_ID, true, DataRowVersion.Current);
                    obj.Tag          = RowFunctions.GetValueFromRowToString(task, TaskObject.TAG, true, DataRowVersion.Current);
                    obj.CreationDate = RowFunctions.GetValueFromRowToString(task, TaskObject.CREATION_DATE, true, DataRowVersion.Current);
                    obj.UpdateDate   = RowFunctions.GetValueFromRowToString(task, TaskObject.UPDATE_DATE, true, DataRowVersion.Current);
                    obj.DueDate      = RowFunctions.GetValueFromRowToString(task, TaskObject.DUE_DATE, true, DataRowVersion.Current);
                    //Do not upload the task description as default for performance issues.
                    obj.Status   = (Enumeration.Task.Status)RowFunctions.GetValueFromRowToInteger(task, TaskObject.STATUS, true, DataRowVersion.Current);
                    obj.Priority = (Enumeration.Task.Priority)RowFunctions.GetValueFromRowToInteger(task, TaskObject.PRIORITY, true, DataRowVersion.Current);
                    obj.Effort   = (Enumeration.Task.Effort)RowFunctions.GetValueFromRowToInteger(task, TaskObject.EFFORT, true, DataRowVersion.Current);
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
        public static VehicleMileageObject VehicleMileageRowToObject(DataRow VehicleMileage)
        {
            VehicleMileageObject obj = new VehicleMileageObject();

            try
            {
                if (VehicleMileage != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(VehicleMileage, VehicleMileageObject.VEHM_ID, false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.VehmID         = RowFunctions.GetValueFromRowToGuid(VehicleMileage, VehicleMileageObject.VEHM_ID, true, DataRowVersion.Current);
                        obj.Transi_TNR_mat = RowFunctions.GetValueFromRowToInteger(VehicleMileage, VehicleMileageObject.TRANSI_TNR_MAT, false, DataRowVersion.Current);
                        obj.Transi_NM_mat  = RowFunctions.GetValueFromRowToString(VehicleMileage, VehicleMileageObject.TRANSI_NM_MAT, false, DataRowVersion.Current);
                        obj.Date           = PROF_IT.Common.Convert.DateFunctions.DBDateToDate(RowFunctions.GetValueFromRowToString(VehicleMileage, VehicleMileageObject.DATE, false, DataRowVersion.Current));
                        obj.Mileage        = RowFunctions.GetValueFromRowToInteger(VehicleMileage, VehicleMileageObject.MILEAGE, false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
        public static FuelDeliveryObject FuelDeliveryRowToObject(DataRow FuelDelivery)
        {
            FuelDeliveryObject obj = new FuelDeliveryObject();

            try
            {
                if (FuelDelivery != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(FuelDelivery, FuelDeliveryObject.FUELDEL_ID, false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.FuelDeliveryID = RowFunctions.GetValueFromRowToGuid(FuelDelivery, FuelDeliveryObject.FUELDEL_ID, true, DataRowVersion.Current);
                        obj.Supplier       = SupplierConvertor.SupplierRowToObject(FuelDelivery);
                        obj.DateDelivery   = RowFunctions.GetValueFromRowToString(FuelDelivery, FuelDeliveryObject.DATE_DELIVERY, false, DataRowVersion.Current);
                        obj.DateInvoice    = RowFunctions.GetValueFromRowToString(FuelDelivery, FuelDeliveryObject.DATE_INVOICE, false, DataRowVersion.Current);
                        obj.Quantity       = RowFunctions.GetValueFromRowToDecimal(FuelDelivery, FuelDeliveryObject.QUANTITY, false, DataRowVersion.Current);
                        obj.UnityPrice     = RowFunctions.GetValueFromRowToDecimal(FuelDelivery, FuelDeliveryObject.UNITY_PRICE, false, DataRowVersion.Current);
                        obj.Location       = (Framework.Common.Enumeration.Fuel.Location)RowFunctions.GetValueFromRowToInteger(FuelDelivery, FuelDeliveryObject.LOCATION, false, DataRowVersion.Current);
                        obj.Remark         = RowFunctions.GetValueFromRowToString(FuelDelivery, FuelDeliveryObject.REMARK, false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
        public static VehicleObject VehicleRowToObject(DataRow Vehicle)
        {
            VehicleObject obj = new VehicleObject();

            try
            {
                if (Vehicle != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(Vehicle, VehicleObject.VEHID, false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.VehID              = RowFunctions.GetValueFromRowToGuid(Vehicle, VehicleObject.VEHID, true, DataRowVersion.Current);
                        obj.Transc_VehicleID   = RowFunctions.GetValueFromRowToInteger(Vehicle, VehicleObject.TRANSC_VEHICLE_ID, false, DataRowVersion.Current);
                        obj.Transc_VehicleType = RowFunctions.GetValueFromRowToInteger(Vehicle, VehicleObject.TRANSC_VEHICLE_TYPE, false, DataRowVersion.Current);
                        obj.Name                = RowFunctions.GetValueFromRowToString(Vehicle, VehicleObject.NAME, false, DataRowVersion.Current);
                        obj.LicenseNumber       = RowFunctions.GetValueFromRowToString(Vehicle, VehicleObject.LICENSE_NUMBER, false, DataRowVersion.Current);
                        obj.Euronorm            = RowFunctions.GetValueFromRowToInteger(Vehicle, VehicleObject.EURONORM, false, DataRowVersion.Current);
                        obj.Chassis             = RowFunctions.GetValueFromRowToString(Vehicle, VehicleObject.CHASSIS, false, DataRowVersion.Current);
                        obj.Brand               = RowFunctions.GetValueFromRowToString(Vehicle, VehicleObject.BRAND, false, DataRowVersion.Current);
                        obj.Icon                = RowFunctions.GetValueFromRowToString(Vehicle, VehicleObject.ICON, false, DataRowVersion.Current);
                        obj.VehicleType         = RowFunctions.GetValueFromRowToString(Vehicle, VehicleObject.VEHICLETYPE, false, DataRowVersion.Current);
                        obj.VehicleTransicsLink = VehicleTransicsLinkConvertor.VehicleTransicsLinkRowToObject(Vehicle);
                        obj.ContactTransics     = RowFunctions.GetValueFromRowToBoolean(Vehicle, VehicleObject.CONTACT_TRANSICS, false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
        public static MaterialSubTypeObject MaterialSubTypeRowToObject(DataRow MaterialSubType, string alias)
        {
            MaterialSubTypeObject obj = new MaterialSubTypeObject();

            try
            {
                if (MaterialSubType != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(MaterialSubType, MaterialSubTypeObject.ConvertColumnToAlias(MaterialSubTypeObject.MATSTYP_ID, alias), false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.MatStypID    = RowFunctions.GetValueFromRowToGuid(MaterialSubType, MaterialSubTypeObject.ConvertColumnToAlias(MaterialSubTypeObject.MATSTYP_ID, alias), true, DataRowVersion.Current);
                        obj.MaterialType = MaterialTypeConvertor.MaterialTypeRowToObject(MaterialSubType, alias);
                        obj.SubType      = RowFunctions.GetValueFromRowToString(MaterialSubType, MaterialSubTypeObject.ConvertColumnToAlias(MaterialSubTypeObject.SUBTYPE, alias), false, DataRowVersion.Current);
                        return(obj);
                    }
                    else
                    {
                        return(null);
                    }
                }
                return(null);
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
        }
Exemple #9
0
        public static UserObject UserRowToObject(DataRow user)
        {
            UserObject obj = new UserObject();

            try
            {
                if (user != null)
                {
                    obj.UsrID     = RowFunctions.GetValueFromRowToGuid(user, UserObject.USR_ID, true, DataRowVersion.Current);
                    obj.Employee  = Employee.EmployeeConvertor.EmployeeRowToObject(user, "");
                    obj.Surname   = RowFunctions.GetValueFromRowToString(user, UserObject.SURNAME, false, DataRowVersion.Current);
                    obj.Name      = RowFunctions.GetValueFromRowToString(user, UserObject.NAME, false, DataRowVersion.Current);
                    obj.Login     = RowFunctions.GetValueFromRowToString(user, UserObject.LOGIN, true, DataRowVersion.Current);
                    obj.Password  = RowFunctions.GetValueFromRowToString(user, UserObject.PASSWORD, true, DataRowVersion.Current);
                    obj.Active    = RowFunctions.GetValueFromRowToBoolean(user, UserObject.ACTIVE, true, DataRowVersion.Current);
                    obj.HasPopups = RowFunctions.GetValueFromRowToBoolean(user, UserObject.HASPOPUPS, false, DataRowVersion.Current);
                    obj.Security  = UserSecurityConvertor.UserSecurityRowToObject(user);
                    obj.SetInitialValues();
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Exemple #10
0
        public static TaskPeopleObject TaskPeopleRowToObject(DataRow taskPeople)
        {
            TaskPeopleObject obj = new TaskPeopleObject();

            try
            {
                if (taskPeople != null)
                {
                    obj.TpeopID  = RowFunctions.GetValueFromRowToGuid(taskPeople, TaskPeopleObject.TPEOP_ID, true, DataRowVersion.Current);
                    obj.Employee = EmployeeConvertor.EmployeeRowToObject(taskPeople, EmployeeObject.TABLE);
                    obj.Supplier = SupplierConvertor.SupplierRowToObject(taskPeople);
                    obj.Customer = CustomerConvertor.CustomerRowToObject(taskPeople);
                    obj.Unknown  = UnknownConvertor.UnknownRowToObject(taskPeople);
                    obj.Assignee = RowFunctions.GetValueFromRowToBoolean(taskPeople, TaskPeopleObject.ASSIGNEE, true, DataRowVersion.Current);
                    obj.Reporter = RowFunctions.GetValueFromRowToBoolean(taskPeople, TaskPeopleObject.REPORTER, true, DataRowVersion.Current);
                    obj.Task     = TaskConvertor.TaskRowToObject(taskPeople);
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
        public static MaintenanceObject MaintenanceRowToObject(DataRow Maintenance)
        {
            MaintenanceObject obj = new MaintenanceObject();

            try
            {
                if (Maintenance != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(Maintenance, MaintenanceObject.MAINT_ID, false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.MaintID = RowFunctions.GetValueFromRowToGuid(Maintenance, MaintenanceObject.MAINT_ID, true, DataRowVersion.Current);
                        //obj.Material = MaterialConvertor.MaterialRowToObject(Maintenance);
                        //obj.MaintenanceVehicle = TIS.DL.Internal.MaintenanceVehicle.MaintenanceVehicleConvertor.MaintenanceVehicleRowToObject(Maintenance);
                        obj.Executor         = EmployeeConvertor.EmployeeRowToObject(Maintenance, "");
                        obj.StartMaintenance = PROF_IT.Common.Convert.DateFunctions.DBDateToDate(RowFunctions.GetValueFromRowToString(Maintenance, MaintenanceObject.START_MAINTENANCE, false, DataRowVersion.Current), false);
                        obj.Remark           = RowFunctions.GetValueFromRowToString(Maintenance, MaintenanceObject.REMARK, false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Exemple #12
0
        public static VehicleTypeObject VehicleTypeRowToObject(DataRow VehicleType)
        {
            VehicleTypeObject obj = new VehicleTypeObject();

            try
            {
                if (VehicleType != null)
                {
                    if (RowFunctions.GetValueFromRowToInt64(VehicleType, VehicleTypeObject.VEHTID, false, DataRowVersion.Current) != Constants.NullInt)
                    {
                        obj.VehtID             = RowFunctions.GetValueFromRowToInteger(VehicleType, VehicleTypeObject.VEHTID, true, DataRowVersion.Current);
                        obj.Transc_VehicleType = RowFunctions.GetValueFromRowToInteger(VehicleType, VehicleTypeObject.TRANSC_VEHICLETYPE, false, DataRowVersion.Current);
                        obj.Type = RowFunctions.GetValueFromRowToString(VehicleType, VehicleTypeObject.TYPE, false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
        public static RevisionObject RevisionRowToObject(DataRow Revision)
        {
            RevisionObject obj = new RevisionObject();

            try
            {
                if (Revision != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(Revision, RevisionObject.REV_ID, false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.RevID            = RowFunctions.GetValueFromRowToGuid(Revision, RevisionObject.REV_ID, true, DataRowVersion.Current);
                        obj.MaterialCategory = MaterialCategoryConvertor.MaterialCategoryRowToObject(Revision, "");
                        obj.MaterialType     = MaterialTypeConvertor.MaterialTypeRowToObject(Revision, "");
                        obj.MaterialSubType  = MaterialSubTypeConvertor.MaterialSubTypeRowToObject(Revision, "");
                        obj.Revision         = RowFunctions.GetValueFromRowToString(Revision, RevisionObject.REVISION, false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Exemple #14
0
        public static VehicleTransicsLinkObject VehicleTransicsLinkRowToObject(DataRow VehicleTransicsLink)
        {
            VehicleTransicsLinkObject obj = new VehicleTransicsLinkObject();

            try
            {
                if (VehicleTransicsLink != null)
                {
                    if (RowFunctions.GetValueFromRowToInteger(VehicleTransicsLink, VehicleTransicsLinkObject.VEHTI_ID, false, DataRowVersion.Current) != 0)
                    {
                        obj.VehtiID          = RowFunctions.GetValueFromRowToInteger(VehicleTransicsLink, VehicleTransicsLinkObject.VEHTI_ID, true, DataRowVersion.Current);
                        obj.Transi_TNR_mat   = RowFunctions.GetValueFromRowToInteger(VehicleTransicsLink, VehicleTransicsLinkObject.TRANSI_TNR_MAT, false, DataRowVersion.Current);
                        obj.Transc_VehicleID = RowFunctions.GetValueFromRowToInteger(VehicleTransicsLink, VehicleTransicsLinkObject.TRANSC_VEHICLEID, false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
        public static LanguageObject LanguageRowToObject(DataRow Language, string alias)
        {
            LanguageObject obj = new LanguageObject();

            try
            {
                if (Language != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(Language, LanguageObject.ConvertColumnToAlias(LanguageObject.LAN_ID, alias), false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.LanID         = RowFunctions.GetValueFromRowToGuid(Language, LanguageObject.ConvertColumnToAlias(LanguageObject.LAN_ID, alias), true, DataRowVersion.Current);
                        obj.Language      = RowFunctions.GetValueFromRowToString(Language, LanguageObject.ConvertColumnToAlias(LanguageObject.LANGUAGE, alias), false, DataRowVersion.Current);
                        obj.LanguageDutch = RowFunctions.GetValueFromRowToString(Language, LanguageObject.ConvertColumnToAlias(LanguageObject.LANGUAGE_DUTCH, alias), false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Exemple #16
0
        public static PopupObject PopupRowToObject(DataRow popup)
        {
            PopupObject obj = new PopupObject();

            try
            {
                if (popup != null)
                {
                    obj.PopupID      = RowFunctions.GetValueFromRowToGuid(popup, PopupObject.POPUP_ID, true, DataRowVersion.Current);
                    obj.Description  = RowFunctions.GetValueFromRowToString(popup, PopupObject.DESCRIPTION, true, DataRowVersion.Current);
                    obj.Repeation    = (Framework.Common.Enumeration.Frequency.TimeFrequency)RowFunctions.GetValueFromRowToInteger(popup, PopupObject.REPEAT, true, DataRowVersion.Current);
                    obj.Time         = RowFunctions.GetValueFromRowToString(popup, PopupObject.TIME, true, DataRowVersion.Current);
                    obj.Active       = RowFunctions.GetValueFromRowToBoolean(popup, PopupObject.ACTIVE, true, DataRowVersion.Current);
                    obj.CreationDate = RowFunctions.GetValueFromRowToString(popup, PopupObject.CREATIONDATE, true, DataRowVersion.Current);
                    obj.ShowDirect   = RowFunctions.GetValueFromRowToBoolean(popup, PopupObject.SHOW_DIRECT, true, DataRowVersion.Current);
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Exemple #17
0
        public static MemoObject MemoRowToObject(DataRow Memo)
        {
            MemoObject obj = new MemoObject();

            try
            {
                if (Memo != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(Memo, MemoObject.MEMO_ID, false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.MemoID = RowFunctions.GetValueFromRowToGuid(Memo, MemoObject.MEMO_ID, true, DataRowVersion.Current);
                        //obj.Material = MaterialConvertor.MaterialRowToObject(Memo);
                        obj.DateTime = PROF_IT.Common.Convert.DateFunctions.DBDateToDate(RowFunctions.GetValueFromRowToString(Memo, MemoObject.DATETIME, false, DataRowVersion.Current));
                        obj.Memo     = RowFunctions.GetValueFromRowToString(Memo, MemoObject.MEMO, false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Exemple #18
0
        public static FuelObject FuelRowToObject(DataRow Fuel)
        {
            FuelObject obj = new FuelObject();

            try
            {
                if (Fuel != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(Fuel, FuelObject.FUEL_ID, false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.FuelID            = RowFunctions.GetValueFromRowToGuid(Fuel, FuelObject.FUEL_ID, true, DataRowVersion.Current);
                        obj.Transi_TNR_reg    = RowFunctions.GetValueFromRowToInteger(Fuel, FuelObject.TRANSI_TNR_REG, false, DataRowVersion.Current);
                        obj.Transi_TNR_person = RowFunctions.GetValueFromRowToInteger(Fuel, FuelObject.TRANSI_TNR_PERSON, false, DataRowVersion.Current);
                        obj.Transi_TNR_mat    = RowFunctions.GetValueFromRowToInteger(Fuel, FuelObject.TRANSI_TNR_MAT, false, DataRowVersion.Current);
                        obj.Transi_TNR_pump   = RowFunctions.GetValueFromRowToInteger(Fuel, FuelObject.TRANSI_TNR_PUMP, false, DataRowVersion.Current);
                        obj.Transi_TNR_tank   = RowFunctions.GetValueFromRowToInteger(Fuel, FuelObject.TRANSI_TNR_TANK, false, DataRowVersion.Current);
                        obj.Transi_FuelType   = RowFunctions.GetValueFromRowToInteger(Fuel, FuelObject.TRANSI_FUELTYPE, false, DataRowVersion.Current);
                        obj.Transc_FuelId     = RowFunctions.GetValueFromRowToInteger(Fuel, FuelObject.TRANSC_FUELID, false, DataRowVersion.Current);
                        obj.Transc_NawID      = RowFunctions.GetValueFromRowToInteger(Fuel, FuelObject.TRANSC_NAWID, false, DataRowVersion.Current);
                        //obj.Transc_Date = RowFunctions.GetValueFromRowToInt64(Fuel, FuelObject.TRANSC_DATE, false, DataRowVersion.Current);
                        obj.Transc_PriveBedrijf = RowFunctions.GetValueFromRowToInteger(Fuel, FuelObject.TRANSC_PRIVEBEDRIJF, false, DataRowVersion.Current);
                        obj.Transc_Product      = RowFunctions.GetValueFromRowToString(Fuel, FuelObject.TRANSC_PRODUCT, false, DataRowVersion.Current);
                        obj.Date                    = RowFunctions.GetValueFromRowToDateTime(Fuel, FuelObject.DATE, false, DataRowVersion.Current);
                        obj.EmployeeName            = RowFunctions.GetValueFromRowToString(Fuel, FuelObject.EMPLOYEE_NAME, false, DataRowVersion.Current).Trim();
                        obj.Employee                = RowFunctions.GetValueFromRowToString(Fuel, FuelObject.EMPLOYEE, false, DataRowVersion.Current).Trim();
                        obj.VehicleLicensePlate     = RowFunctions.GetValueFromRowToString(Fuel, FuelObject.VEHICLE_LICENSEPLATE, false, DataRowVersion.Current).Trim();
                        obj.VehicleKilometreCounter = RowFunctions.GetValueFromRowToInteger(Fuel, FuelObject.VEHICLE_KILOMETRECOUNTER, false, DataRowVersion.Current);
                        obj.Quantity                = RowFunctions.GetValueFromRowToDecimal(Fuel, FuelObject.QUANTITY, false, DataRowVersion.Current);
                        obj.QuantityCorrection      = RowFunctions.GetValueFromRowToDecimal(Fuel, FuelObject.QUANTITY_CORRECTION, false, DataRowVersion.Current);
                        obj.FullTank                = RowFunctions.GetValueFromRowToDecimal(Fuel, FuelObject.FULLTANK, false, DataRowVersion.Current);
                        obj.UnityPrice              = RowFunctions.GetValueFromRowToDecimal(Fuel, FuelObject.UNITYPRICE, false, DataRowVersion.Current);
                        obj.TotalPrice              = RowFunctions.GetValueFromRowToDecimal(Fuel, FuelObject.TOTALPRICE, false, DataRowVersion.Current);
                        obj.Unit                    = RowFunctions.GetValueFromRowToInteger(Fuel, FuelObject.UNIT, false, DataRowVersion.Current);
                        obj.Supplier                = RowFunctions.GetValueFromRowToString(Fuel, FuelObject.SUPPLIER, false, DataRowVersion.Current).Trim();
                        obj.Location                = RowFunctions.GetValueFromRowToString(Fuel, FuelObject.LOCATION, false, DataRowVersion.Current);
                        obj.FuelType                = (Framework.Common.Enumeration.Fuel.FuelType)RowFunctions.GetValueFromRowToInteger(Fuel, FuelObject.FUELTYPE, false, DataRowVersion.Current);
                        obj.Btw                      = RowFunctions.GetValueFromRowToDecimal(Fuel, FuelObject.BTW, false, DataRowVersion.Current);
                        obj.PrivateTanking           = RowFunctions.GetValueFromRowToBoolean(Fuel, FuelObject.PRIVATE_TANKING, false, DataRowVersion.Current);
                        obj.CompanyTanking           = RowFunctions.GetValueFromRowToBoolean(Fuel, FuelObject.COMPANY_TANKING, false, DataRowVersion.Current);
                        obj.InvoiceReceived          = RowFunctions.GetValueFromRowToBoolean(Fuel, FuelObject.INVOICE_RECEIVED, false, DataRowVersion.Current);
                        obj.InvoiceOK                = RowFunctions.GetValueFromRowToBoolean(Fuel, FuelObject.INVOICE_OK, false, DataRowVersion.Current);
                        obj.DateMailForbiddenFueling = PROF_IT.Common.Convert.DateFunctions.DBDateToDateTime(RowFunctions.GetValueFromRowToString(Fuel, FuelObject.DATEMAIL_FORBIDDENFUELING, false, DataRowVersion.Current), false);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Exemple #19
0
        public static TurnOverObject CustomerRowToObject(DataRow turnOvers)
        {
            TurnOverObject obj = new TurnOverObject();

            try
            {
                if (turnOvers != null)
                {
                    if (turnOvers.Table.Columns.Contains(TurnOverObject.TNR_ID))
                    {
                        obj.TnrID = RowFunctions.GetValueFromRowToInteger(turnOvers, TurnOverObject.TNR_ID, true, DataRowVersion.Current);
                    }

                    if (turnOvers.Table.Columns.Contains(TurnOverObject.YEAR))
                    {
                        obj.Year = RowFunctions.GetValueFromRowToInteger(turnOvers, TurnOverObject.YEAR, false, DataRowVersion.Current);
                    }

                    if (turnOvers.Table.Columns.Contains(TurnOverObject.MONTH))
                    {
                        obj.Month = RowFunctions.GetValueFromRowToInteger(turnOvers, TurnOverObject.MONTH, false, DataRowVersion.Current);
                    }

                    if (turnOvers.Table.Columns.Contains(TurnOverObject.DATE))
                    {
                        obj.Date = RowFunctions.GetValueFromRowToString(turnOvers, TurnOverObject.DATE, true, DataRowVersion.Current);
                    }

                    if (turnOvers.Table.Columns.Contains(TurnOverObject.VEHICLE))
                    {
                        obj.Vehicle = RowFunctions.GetValueFromRowToString(turnOvers, TurnOverObject.VEHICLE, true, DataRowVersion.Current);
                    }

                    if (turnOvers.Table.Columns.Contains(TurnOverObject.TURNOVER))
                    {
                        obj.TurnOver = RowFunctions.GetValueFromRowToDecimal(turnOvers, TurnOverObject.TURNOVER, true, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
        public static MaterialObject MaterialRowToObject(DataRow Material)
        {
            MaterialObject obj = new MaterialObject();

            try
            {
                if (Material != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(Material, MaterialObject.MAT_ID, false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.MatID               = RowFunctions.GetValueFromRowToGuid(Material, MaterialObject.MAT_ID, true, DataRowVersion.Current);
                        obj.MaterialCategory    = MaterialCategoryConvertor.MaterialCategoryRowToObject(Material, "");
                        obj.MaterialType        = MaterialTypeConvertor.MaterialTypeRowToObject(Material, "");
                        obj.MaterialSubType     = MaterialSubTypeConvertor.MaterialSubTypeRowToObject(Material, "");
                        obj.EmployeeCreator     = EmployeeConvertor.EmployeeRowToObject(Material, "Creator");
                        obj.EmployeeResponsable = EmployeeConvertor.EmployeeRowToObject(Material, "Responsable");
                        obj.Vehicle             = VehicleConvertor.VehicleRowToObject(Material);
                        obj.Supplier            = SupplierConvertor.SupplierRowToObject(Material);
                        obj.Name                 = RowFunctions.GetValueFromRowToString(Material, MaterialObject.NAME, false, DataRowVersion.Current);
                        obj.Description          = RowFunctions.GetValueFromRowToString(Material, MaterialObject.DESCRIPTION, false, DataRowVersion.Current);
                        obj.Type                 = (TIS.Framework.Common.Enumeration.Material.Type)RowFunctions.GetValueFromRowToInteger(Material, MaterialObject.TYPE, false, DataRowVersion.Current);
                        obj.SerieNumber          = RowFunctions.GetValueFromRowToString(Material, MaterialObject.SERIE_NUMBER, false, DataRowVersion.Current);
                        obj.InternalNumber       = RowFunctions.GetValueFromRowToString(Material, MaterialObject.INTERNAL_NUMBER, false, DataRowVersion.Current);
                        obj.PurchasedOn          = PROF_IT.Common.Convert.DateFunctions.DBDateToDate(RowFunctions.GetValueFromRowToString(Material, MaterialObject.PURCHASEDON, false, DataRowVersion.Current), false);
                        obj.Price                = RowFunctions.GetValueFromRowToDecimal(Material, MaterialObject.PRICE, false, DataRowVersion.Current);
                        obj.NextMaintenance      = PROF_IT.Common.Convert.DateFunctions.DBDateToDate(RowFunctions.GetValueFromRowToString(Material, MaterialObject.NEXT_MAINTENANCE, false, DataRowVersion.Current), false);
                        obj.MaintenanceFrequency = RowFunctions.GetValueFromRowToInteger(Material, MaterialObject.MAINTENANCE_FREQUENCY, false, DataRowVersion.Current);
                        obj.Broken               = RowFunctions.GetValueFromRowToBoolean(Material, MaterialObject.BROKEN, false, DataRowVersion.Current);
                        obj.Active               = RowFunctions.GetValueFromRowToBoolean(Material, MaterialObject.ACTIVE, false, DataRowVersion.Current);
                    }

                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Exemple #21
0
        public static TaskScheduleObject TaskScheduleRowToObject(DataRow taskSchedule)
        {
            TaskScheduleObject obj = new TaskScheduleObject();

            try
            {
                if (taskSchedule != null)
                {
                    obj.TschedID = RowFunctions.GetValueFromRowToGuid(taskSchedule, TaskScheduleObject.TSCHED_ID, true, DataRowVersion.Current);
                    obj.Schedule = ScheduleConvertor.ScheduleRowToObject(taskSchedule);
                    obj.Task     = TaskConvertor.TaskRowToObject(taskSchedule);
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Exemple #22
0
        public static ParameterSystemObject ParameterSystemRowToObject(DataRow parameterSystem)
        {
            ParameterSystemObject obj = new ParameterSystemObject();

            try
            {
                if (parameterSystem != null)
                {
                    obj.ParID   = RowFunctions.GetValueFromRowToGuid(parameterSystem, ParameterSystemObject.PAR_ID, true, DataRowVersion.Current);
                    obj.KeyName = RowFunctions.GetValueFromRowToString(parameterSystem, ParameterSystemObject.KEYNAME, true, DataRowVersion.Current);
                    obj.Value   = RowFunctions.GetValueFromRowToString(parameterSystem, ParameterSystemObject.VALUE, true, DataRowVersion.Current);
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
        public static SupplierObject SupplierRowToObject(DataRow supplier)
        {
            SupplierObject obj = null;

            try
            {
                if (supplier != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(supplier, SupplierObject.SUP_ID, false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj             = new SupplierObject();
                        obj.SupID       = RowFunctions.GetValueFromRowToGuid(supplier, SupplierObject.SUP_ID, true, DataRowVersion.Current);
                        obj.TranscID    = RowFunctions.GetValueFromRowToInteger(supplier, SupplierObject.TRANSC_ID, false, DataRowVersion.Current);
                        obj.TasID       = RowFunctions.GetValueFromRowToInteger(supplier, SupplierObject.TAS_ID, false, DataRowVersion.Current);
                        obj.Name        = RowFunctions.GetValueFromRowToString(supplier, SupplierObject.NAME, false, DataRowVersion.Current);
                        obj.Name2       = RowFunctions.GetValueFromRowToString(supplier, SupplierObject.NAME2, false, DataRowVersion.Current);
                        obj.Street      = RowFunctions.GetValueFromRowToString(supplier, SupplierObject.STREET, false, DataRowVersion.Current);
                        obj.HouseNumber = RowFunctions.GetValueFromRowToString(supplier, SupplierObject.HOUSE_NUMBER, false, DataRowVersion.Current);
                        obj.Zipcode     = RowFunctions.GetValueFromRowToString(supplier, SupplierObject.ZIPCODE, false, DataRowVersion.Current);
                        obj.Town        = RowFunctions.GetValueFromRowToString(supplier, SupplierObject.TOWN, false, DataRowVersion.Current);
                        obj.Country     = RowFunctions.GetValueFromRowToString(supplier, SupplierObject.COUNTRY, false, DataRowVersion.Current);
                        obj.Vat         = RowFunctions.GetValueFromRowToString(supplier, SupplierObject.VAT, false, DataRowVersion.Current);
                        obj.Phone       = RowFunctions.GetValueFromRowToString(supplier, SupplierObject.PHONE, false, DataRowVersion.Current);
                        obj.Language    = RowFunctions.GetValueFromRowToString(supplier, SupplierObject.LANGUAGE, false, DataRowVersion.Current);
                        obj.Currency    = RowFunctions.GetValueFromRowToString(supplier, SupplierObject.CURRENCY, false, DataRowVersion.Current);
                        obj.Email       = RowFunctions.GetValueFromRowToString(supplier, SupplierObject.EMAIL, false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Exemple #24
0
        public static EmployeeObject EmployeeRowToObject(DataRow employee, string alias)
        {
            EmployeeObject obj = new EmployeeObject();

            try
            {
                if (employee != null)
                {
                    string aliasLanguage = "";
                    if (alias != "")
                    {
                        aliasLanguage = alias + "Language";
                    }
                    string test = EmployeeObject.ConvertColumnToAlias(EmployeeObject.EMP_ID, alias);
                    if (RowFunctions.GetValueFromRowToGuid(employee, EmployeeObject.ConvertColumnToAlias(EmployeeObject.EMP_ID, alias), false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.EmpID          = RowFunctions.GetValueFromRowToGuid(employee, EmployeeObject.ConvertColumnToAlias(EmployeeObject.EMP_ID, alias), true, DataRowVersion.Current);
                        obj.TranscID       = RowFunctions.GetValueFromRowToInteger(employee, EmployeeObject.ConvertColumnToAlias(EmployeeObject.TRANSC_ID, alias), true, DataRowVersion.Current);
                        obj.TransiID       = RowFunctions.GetValueFromRowToInteger(employee, EmployeeObject.ConvertColumnToAlias(EmployeeObject.TRANSI_ID, alias), false, DataRowVersion.Current);
                        obj.Name           = RowFunctions.GetValueFromRowToString(employee, EmployeeObject.ConvertColumnToAlias(EmployeeObject.NAME, alias), false, DataRowVersion.Current);
                        obj.Surname        = RowFunctions.GetValueFromRowToString(employee, EmployeeObject.ConvertColumnToAlias(EmployeeObject.SURNAME, alias), false, DataRowVersion.Current);
                        obj.Email          = RowFunctions.GetValueFromRowToString(employee, EmployeeObject.ConvertColumnToAlias(EmployeeObject.EMAIL, alias), false, DataRowVersion.Current);
                        obj.Archive        = RowFunctions.GetValueFromRowToBoolean(employee, EmployeeObject.ConvertColumnToAlias(EmployeeObject.ARCHIVE, alias), false, DataRowVersion.Current);
                        obj.TranscLanguage = RowFunctions.GetValueFromRowToInteger(employee, EmployeeObject.ConvertColumnToAlias(EmployeeObject.TRANSC_LANGUAGE, alias), false, DataRowVersion.Current);
                        obj.Language       = LanguageConvertor.LanguageRowToObject(employee, aliasLanguage);
                        obj.RepeatMail     = RowFunctions.GetValueFromRowToBoolean(employee, EmployeeObject.ConvertColumnToAlias(EmployeeObject.REPEAT_MAIL, alias), false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Exemple #25
0
        public static MaterialCategoryObject MaterialCategoryRowToObject(DataRow MaterialCategory, string alias)
        {
            MaterialCategoryObject obj = new MaterialCategoryObject();

            try
            {
                if (MaterialCategory != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(MaterialCategory, MaterialCategoryObject.ConvertColumnToAlias(MaterialCategoryObject.MATCAT_ID, alias), false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.MatcatID = RowFunctions.GetValueFromRowToGuid(MaterialCategory, MaterialCategoryObject.ConvertColumnToAlias(MaterialCategoryObject.MATCAT_ID, alias), true, DataRowVersion.Current);
                        obj.Category = RowFunctions.GetValueFromRowToString(MaterialCategory, MaterialCategoryObject.ConvertColumnToAlias(MaterialCategoryObject.CATEGORY, alias), false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Exemple #26
0
        public static UnknownObject UnknownRowToObject(DataRow unknown)
        {
            UnknownObject obj = new UnknownObject();

            try
            {
                if (unknown != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(unknown, UnknownObject.UNK_ID, false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.UnkID = RowFunctions.GetValueFromRowToGuid(unknown, UnknownObject.UNK_ID, true, DataRowVersion.Current);
                        obj.Email = RowFunctions.GetValueFromRowToString(unknown, UnknownObject.EMAIL, true, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Exemple #27
0
        public static UserSecurityObject UserSecurityRowToObject(DataRow user)
        {
            UserSecurityObject obj = new UserSecurityObject();

            try
            {
                if (user != null)
                {
                    obj = (UserSecurityObject)PROF_IT.Common.Convert.Byte.ByteArrayToObject(RowFunctions.GetValueFromRowToByteArray(user, UserObject.SECURITY, true, DataRowVersion.Current));
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }