Пример #1
0
 private void ExcuteDeleteDelivery()
 {
     try
     {
         if (MessageBox.Show("Are you Sure You want to Delete this Delivery?", "Delete Delivery",
                             MessageBoxButton.YesNoCancel, MessageBoxImage.Warning) == MessageBoxResult.Yes)
         {
             SelectedDelivery.Enabled = false;
             var stat = _deliveryService.Disable(SelectedDelivery);
             if (stat == string.Empty)
             {
                 Deliverys.Remove(SelectedDelivery);
                 Deliverys = Deliverys;
             }
             else
             {
                 MessageBox.Show("Can't Delete Delivery, Please try again!!" + Environment.NewLine + stat,
                                 "Can't delete", MessageBoxButton.OK, MessageBoxImage.Error);
             }
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show("Can't Delete Delivery, Please try again!!"
                         + Environment.NewLine + exception.Message, "Can't delete", MessageBoxButton.OK,
                         MessageBoxImage.Error);
     }
 }
Пример #2
0
 public void GetSummary()
 {
     if (Deliverys != null)
     {
         TotalNumberOfDelivery = Deliverys.Count();
     }
 }
Пример #3
0
    private void Start()
    {
        turnText            = GameObject.Find("Turn").GetComponent <Text>();
        score               = GameObject.Find("Score").GetComponent <ScoreMain>();
        manager             = GameObject.FindGameObjectsWithTag("RiskManager")[0].GetComponent <RiskManager>();
        deliverys           = GameObject.Find("Deliverys").GetComponent <Deliverys>();
        storeController     = GameObject.Find("StoreController").GetComponent <StoreController>();
        teamController      = GameObject.Find("TeamController").GetComponent <TeamController>();
        teamControllerStore = GameObject.Find("TeamControllerStore").GetComponent <TeamControllerStore>();
        buildController     = GameObject.Find("BuildController").GetComponent <BuildController>();

        wether = GameObject.Find("Wether").GetComponent <Image>();

        score.ChangeScore(-10000000);

        mounths     = new string[12];
        mounths[0]  = "Июнь";
        mounths[1]  = "Июль";
        mounths[2]  = "Август";
        mounths[3]  = "Сентябрь";
        mounths[4]  = "Октябрь";
        mounths[5]  = "Ноябрь";
        mounths[6]  = "Декабрь";
        mounths[7]  = "Янаврь";
        mounths[8]  = "Февраль";
        mounths[9]  = "Март";
        mounths[10] = "Апрель";
        mounths[11] = "Май";
    }
Пример #4
0
        public async Task <IHttpActionResult> PutTDelivery(int id, Deliverys tDelivery)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != tDelivery.Id)
            {
                return(BadRequest());
            }

            db.Entry(tDelivery).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!TDeliveryExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
Пример #5
0
 public void LLenarClase(Deliverys delivery)
 {
     delivery.Nombres   = nombresTextBox.Text;
     delivery.Telefono  = telefonoTextBox.Text;
     delivery.Celular   = celularTextBox.Text;
     delivery.Cedula    = cedulaTextBox.Text;
     delivery.Email     = emailTextBox.Text;
     delivery.Direccion = direccionTextBox.Text;
 }
Пример #6
0
 public void LLenarCampos(Deliverys delivery)
 {
     iddeliveryTextBox.Text = delivery.IdDelivery.ToString();
     nombresTextBox.Text    = delivery.Nombres;
     telefonoTextBox.Text   = delivery.Telefono;
     celularTextBox.Text    = delivery.Celular;
     cedulaTextBox.Text     = delivery.Cedula;
     emailTextBox.Text      = delivery.Email;
     direccionTextBox.Text  = delivery.Direccion;
 }
Пример #7
0
        public async Task <IHttpActionResult> GetTDelivery(int id)
        {
            Deliverys tDelivery = await db.Delivery.FindAsync(id);

            if (tDelivery == null)
            {
                return(NotFound());
            }

            return(Ok(tDelivery));
        }
Пример #8
0
 private void Start()
 {
     scoreController = GameObject.Find("Score").GetComponent <ScoreMain>();
     int[] array = new int[3];
     array[0] = 2;
     array[1] = 3;
     array[2] = 10;
     RestoreSmallToBig(array, 1);
     teamController = GameObject.Find("TeamController").GetComponent <TeamController>();
     deliverys      = GameObject.Find("Deliverys").GetComponent <Deliverys>();
 }
Пример #9
0
        public async Task <IHttpActionResult> PostTDelivery(Deliverys tDelivery)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.Delivery.Add(tDelivery);
            await db.SaveChangesAsync();

            return(CreatedAtRoute("DefaultApi", new { id = tDelivery.Id }, tDelivery));
        }
Пример #10
0
        public async Task <IHttpActionResult> DeleteTDelivery(int id)
        {
            Deliverys tDelivery = await db.Delivery.FindAsync(id);

            if (tDelivery == null)
            {
                return(NotFound());
            }

            db.Delivery.Remove(tDelivery);
            await db.SaveChangesAsync();

            return(Ok(tDelivery));
        }
Пример #11
0
 protected void buscarButton_Click(object sender, EventArgs e)
 {
     if (buscarDropDownList.SelectedIndex == 0)
     {
         buscarGridView.DataSource = Deliverys.Listar("*", "IdDelivery like '" + buscarTextBox.Text + "%'");
         buscarGridView.DataBind();
     }
     if (buscarDropDownList.SelectedIndex == 1)
     {
         buscarGridView.DataSource = Deliverys.Listar("*", "Nombres like '" + buscarTextBox.Text + "%'");
         buscarGridView.DataBind();
     }
     if (buscarDropDownList.SelectedIndex == 2)
     {
         buscarGridView.DataSource = Deliverys.Listar("*", "Cedula like '" + buscarTextBox.Text + "%'");
         buscarGridView.DataBind();
     }
 }
Пример #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (User.Identity.IsAuthenticated)
         {
             Deliverys delivery = new Deliverys();
             if (Request.QueryString["IdDelivery"] != null)
             {
                 delivery.IdDelivery = int.Parse(Request.QueryString["IdDelivery"]);
                 if (delivery.Buscar())
                 {
                     this.LLenarCampos(delivery);
                 }
             }
         }
     }
 }
Пример #13
0
        protected void guardarButton_Click(object sender, EventArgs e)
        {
            Deliverys delivery = new Deliverys();

            this.LLenarClase(delivery);


            if (Request.QueryString["IdDelivery"] != null)
            {
                delivery.IdDelivery = int.Parse(Request.QueryString["IdDelivery"]);
                delivery.Modificar();
                mensajeLabel.Text = "El registro se ha Modificado Correctamente";
            }
            else
            {
                delivery.Insertar();
                mensajeLabel.Text = "El registro se ha Guardado Correctamente";
            }
        }
Пример #14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.buscarGridView.DataSource = Deliverys.Listar("*", "1=1");
     this.buscarGridView.DataBind();
 }
Пример #15
0
 protected void EliminarButton_Click(object sender, EventArgs e)
 {
     Deliverys.Eliminar(int.Parse(Request.QueryString["IdDelivery"]));
     mensajeLabel.Text = "El registro se ha Eliminado Correctamente";
 }