예제 #1
0
        internal int GetLastInspaction(string token, string idDriver, ref string latsInspection, ref string plateTruck, ref string plateTrailer, ref string description)
        {
            driverInspecktion = new DriverInspecktion();
            //CountReqvest++;
            int statePay = 1;

            if (CrossConnectivity.Current.IsConnected)
            {
                statePay = driverInspecktion.GetLastInspaction(token, idDriver, ref latsInspection, ref plateTruck, ref plateTrailer, ref description);
            }
            driverInspecktion = null;
            CountReqvest--;
            return(statePay);
        }
예제 #2
0
        internal int CheckPlate(string token, ref string description, ref string plateTruckAndTrailer)
        {
            driverInspecktion = new DriverInspecktion();
            //WaiteNoramalReqvestCount();
            CountReqvest++;
            int statePay = 1;

            if (CrossConnectivity.Current.IsConnected)
            {
                statePay = driverInspecktion.CheckPlate(token, ref description, ref plateTruckAndTrailer);
            }
            driverInspecktion = null;
            CountReqvest--;
            return(statePay);
        }
예제 #3
0
        internal int SetPlate(string token, string plateTruck, string plateTrailer, string nowCheck, ref string description, ref bool isPlate, ref TruckCar truckCar)
        {
            driverInspecktion = new DriverInspecktion();
            //WaiteNoramalReqvestCount();
            CountReqvest++;
            int statePay = 1;

            if (CrossConnectivity.Current.IsConnected)
            {
                statePay = driverInspecktion.SetPlate(token, plateTruck, plateTrailer, nowCheck, ref description, ref isPlate, ref truckCar);
            }
            driverInspecktion = null;
            CountReqvest--;
            return(statePay);
        }
예제 #4
0
        public int DriverWork(string typeDriver, string token, ref string description, ref bool isInspection, ref int indexPhoto, ref TruckCar truckCar)
        {
            driverInspecktion = new DriverInspecktion();
            //WaiteNoramalReqvestCount();
            CountReqvest++;
            int stateDriver = 1;

            if (CrossConnectivity.Current.IsConnected)
            {
                if (typeDriver == "CheckInspeacktion")
                {
                    stateDriver = driverInspecktion.CheckInspectionDriver(token, ref description, ref isInspection, ref indexPhoto, ref truckCar);
                }
            }
            driverInspecktion = null;
            CountReqvest--;
            return(stateDriver);
        }
예제 #5
0
        public int DriverWork(string typeDriver, string token, ref string description, string idDriver, InspectionDriver inspectionDriver = null)
        {
            driverInspecktion = new DriverInspecktion();
            //WaiteNoramalReqvestCount();
            CountReqvest++;
            int stateDriver = 1;

            if (CrossConnectivity.Current.IsConnected)
            {
                if (typeDriver == "SetInspectionDriver")
                {
                    stateDriver = driverInspecktion.SetInspectionDriver(token, ref description, inspectionDriver, idDriver);
                }
                else if (typeDriver == "UpdateInspectionDriver")
                {
                    stateDriver = driverInspecktion.UpdateInspectionDriver(token, ref description, idDriver);
                }
            }
            driverInspecktion = null;
            CountReqvest--;
            return(stateDriver);
        }
예제 #6
0
        public int AskWork(string typeInspection, string token, string id, object obj, ref string description, string idShiping = null, int indexPhoto = 0, string typeTransportVehicle = null)
        {
            int stateInspection = 1;

            //WaiteNoramalReqvestCount();
            CountReqvest++;
            if (CrossConnectivity.Current.IsConnected)
            {
                if (typeInspection == "SaveAsk")
                {
                    inspection      = new Inspection();
                    stateInspection = inspection.SaveAsk(token, id, (Models.Ask)obj, ref description);
                }
                else if (typeInspection == "SavePhoto")
                {
                    inspection      = new Inspection();
                    stateInspection = inspection.SavePhoto(token, id, (Models.PhotoInspection)obj, ref description);
                }
                else if (typeInspection == "SaveAsk1")
                {
                    inspection      = new Inspection();
                    stateInspection = inspection.SaveAsk(token, id, (Models.Ask1)obj, ref description);
                }
                else if (typeInspection == "SaveAsk2")
                {
                    inspection      = new Inspection();
                    stateInspection = inspection.SaveAsk(token, id, (Models.Ask2)obj, ref description);
                }
                else if (typeInspection == "AskFromUser")
                {
                    inspection      = new Inspection();
                    stateInspection = inspection.SaveAsk(token, id, (AskFromUser)obj, ref description);
                }
                else if (typeInspection == "FeedBack")
                {
                    inspection      = new Inspection();
                    stateInspection = inspection.SaveAsk(token, (Models.Feedback)obj, ref description);
                }
                else if (typeInspection == "AskDelyvery")
                {
                    inspection      = new Inspection();
                    stateInspection = inspection.SaveAsk(token, id, (Models.AskDelyvery)obj, ref description);
                }
                else if (typeInspection == "AskForUserDelyvery")
                {
                    inspection      = new Inspection();
                    stateInspection = inspection.SaveAsk(token, id, (Models.AskForUserDelyveryM)obj, ref description);
                }
                else if (typeInspection == "AskPikedUpSig")
                {
                    inspection      = new Inspection();
                    stateInspection = inspection.SaveSigPikedUp(token, (Photo)obj, id, ref description);
                }
                else if (typeInspection == "DamageForUser")
                {
                    inspection      = new Inspection();
                    stateInspection = inspection.SaveDamageForuser(token, id, idShiping, (List <DamageForUser>)obj, ref description);
                }
                else if (typeInspection == "SaveInspactionDriver")
                {
                    driverInspecktion = new DriverInspecktion();
                    stateInspection   = driverInspecktion.SaveInspactionDriver(token, ref description, id, (Photo)obj, indexPhoto, typeTransportVehicle);
                }
                else if (typeInspection == "SendBolMail")
                {
                    inspection      = new Inspection();
                    stateInspection = inspection.SendBolEmaile(token, id, ref description, (string)obj);
                }
                else if (typeInspection == "SendCouponMail")
                {
                    inspection      = new Inspection();
                    stateInspection = inspection.SendCouponEmaile(token, ref description, (string)obj);
                }
                else if (typeInspection == "SaveInTruck")
                {
                    inspection      = new Inspection();
                    stateInspection = inspection.SaveInTruck(token, id, (List <Photo>)obj, ref description);
                }
                else if (typeInspection == "SaveStrap")
                {
                    inspection      = new Inspection();
                    stateInspection = inspection.SaveStrap(token, id, (List <Photo>)obj, ref description);
                }
            }
            driverInspecktion = null;
            inspection        = null;
            CountReqvest--;
            return(stateInspection);
        }