Exemplo n.º 1
0
        private void fillData()
        {
            try
            {
                hf_clientes.Value = JsonConvert.SerializeObject(CatalogCtrl.Cliente_GetAll(), Formatting.Indented);

                //int idBodega = ((MstCasc)this.Master).getUsrLoged().Id_bodega;
                ControlsMng.fillBodegaByUser(ddlBodega, ((MstCasc)this.Master).getUsrLoged().Id);
                ddlBodega.Items[0].Selected = true;

                ControlsMng.fillCortinaByBodega(ddlCortina, Convert.ToInt32(ddlBodega.SelectedItem.Value));
                txt_fecha.Text = DateTime.Today.ToString("dd MMMM yy");
                //txt_bodega.Text = CatalogCtrl.BodegaGet(idBodega).Nombre;
                ControlsMng.fillTipoCarga(ddlTipoCarga);
                ddlTipoCarga.SelectedValue = "2";// En arribos por lo general llegan a granel
                hf_Documentos.Value        = CatalogCtrl.DocumentoLstToJson();
                //ControlsMng.fillDocumento(ddlDocumento);
                //ddlDocumento.Items.Remove(ddlDocumento.Items.FindByValue("1"));
                hf_id_usuario.Value = ((MstCasc)this.Master).getUsrLoged().Id.ToString();
                ControlsMng.fillCustodia(ddlCustodia);
                ControlsMng.fillVigilanciaByBodega(ddlVigilante, Convert.ToInt32(ddlBodega.SelectedValue));

                #region partidas
                VSLstEntPart            = new List <Entrada_partida>();
                grd_partidas.DataSource = VSLstEntPart;
                grd_partidas.DataBind();
                #endregion
            }
            catch
            {
                throw;
            }
        }
Exemplo n.º 2
0
        private string cliente(HttpContext context)
        {
            string response = string.Empty;
            string option   = context.Request["opt"].ToString();
            string key      = string.Empty;

            switch (option)
            {
            case "getAll":
                response = JsonConvert.SerializeObject(CatalogCtrl.Cliente_GetAll());
                break;

            case "getCopyByOperation":
                int id_cliente   = 0;
                int id_operation = 0;
                int.TryParse(context.Request["id_cliente"], out id_cliente);
                int.TryParse(context.Request["id_operation"], out id_operation);

                response = JsonConvert.SerializeObject(CatalogCtrl.ClienteCopiaOperacionLst(id_operation, id_cliente));

                break;

            default:
                throw new Exception("La opción " + option + " no existe");
            }
            return(response);
        }