Ejemplo n.º 1
0
        public async void Assign(string idOrder, string idDriver)
        {
            bool   isDriverAssign = _sqlEntityFramworke.CheckDriverOnShipping(idOrder);
            string tokenShope     = null;

            if (isDriverAssign)
            {
                tokenShope = _sqlEntityFramworke.GerShopTokenForShipping(idOrder);
            }
            List <VehiclwInformation> vehiclwInformations = await _sqlEntityFramworke.AddDriversInOrder(idOrder, idDriver);

            Task.Run(() =>
            {
                ManagerNotifyWeb managerNotify = new ManagerNotifyWeb();
                string tokenShope1             = _sqlEntityFramworke.GerShopTokenForShipping(idOrder);
                if (!isDriverAssign)
                {
                    managerNotify.SendNotyfyAssign(idOrder, tokenShope1, vehiclwInformations);
                }
                else
                {
                    managerNotify.SendNotyfyAssign(idOrder, tokenShope1, vehiclwInformations);
                    managerNotify.SendNotyfyUnassign(idOrder, tokenShope, vehiclwInformations);
                }
            });
        }
Ejemplo n.º 2
0
        public async void Unassign(string idOrder)
        {
            ManagerNotifyWeb          managerNotify       = new ManagerNotifyWeb();
            string                    tokenShope          = _sqlEntityFramworke.GerShopTokenForShipping(idOrder);
            List <VehiclwInformation> vehiclwInformations = await _sqlEntityFramworke.RemoveDriversInOrder(idOrder);

            Task.Run(() =>
            {
                managerNotify.SendNotyfyUnassign(idOrder, tokenShope, vehiclwInformations);
            });
        }
Ejemplo n.º 3
0
        internal bool SendRemindInspection(int idDriver)
        {
            ManagerNotifyWeb managerNotifyWeb        = new ManagerNotifyWeb();
            bool             isInspactionDriverToDay = _sqlEntityFramworke.CheckInspactionDriverToDay(idDriver);

            if (!isInspactionDriverToDay)
            {
                string tokenShiping = _sqlEntityFramworke.GerShopToken(idDriver.ToString());
                managerNotifyWeb.SendSendNotyfyRemindInspection(tokenShiping);
            }
            return(isInspactionDriverToDay);
        }