コード例 #1
0
        public int SavePay(string typeReqvest, string token, string idShiping, int type, object obj, ref string description)
        {
            inspection = new Inspection();
            //WaiteNoramalReqvestCount();
            CountReqvest++;
            int statePay = 1;

            if (CrossConnectivity.Current.IsConnected)
            {
                if (typeReqvest == "SaveSig")
                {
                    statePay = inspection.SavePhotPay(token, idShiping, type, (Photo)obj, ref description);
                }
                else if (typeReqvest == "SaveRecount")
                {
                    statePay = new Inspection().SaveVideoRecount(token, idShiping, type, (Video)obj, ref description);
                }
            }
            inspection = null;
            CountReqvest--;
            return(statePay);
        }
コード例 #2
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);
        }