protected void btnFiltro_Click1(object sender, EventArgs e)
        {
            if (txtNumeroOT.Text.Length > 4)
            {
                RadGrid2.Visible    = false;
                RadGrid1.Visible    = true;
                RadGrid1.DataSource = controldes.ListarDespacho_informePorOT(txtNumeroOT.Text, null, null, null, null, 1);
                RadGrid1.DataBind();

                ibPDF.Visible = false;
            }
            else
            {
                if (txtFechaInicio.Text != "" && txtFechaTermino.Text != "")
                {
                    string   fechaI = txtFechaInicio.Text;
                    string[] str    = fechaI.Split('/');
                    string   dia    = str[0];
                    string   mes    = str[1];
                    string   año    = str[2];
                    año = año.Substring(0, 4);

                    string fechaInicio = año + "-" + mes + "-" + dia;
                    //fechas
                    string   fechaT = txtFechaTermino.Text;
                    string[] str2   = fechaT.Split('/');
                    string   dia2   = str2[0];
                    string   mes2   = str2[1];
                    string   año2   = str2[2];
                    año2 = año2.Substring(0, 4);

                    string fechaTermino = año2 + "-" + mes2 + "-" + dia2;
                    RadGrid1.Visible = false;
                    RadGrid2.Visible = true;
                    //carga con fechas
                    if (fechaInicio == fechaTermino)
                    {
                        fechaInicio  = fechaInicio + " 00:00:00";
                        fechaTermino = fechaTermino + " 23:59:59";
                    }
                    RadGrid2.DataSource = controldes.ListarDespacho_informePorOTAgrupada(txtNombreOT.Text, txtNumeroOT.Text, fechaInicio, fechaTermino, 2);
                    RadGrid2.DataBind();

                    ibPDF.Visible = false;
                }
                else
                {
                    string fi = "2012-01-01 00:00:00";
                    string ft = "2100-01-01 23:59:59";
                    RadGrid1.Visible = false;
                    RadGrid2.Visible = true;
                    //carga con fechas
                    RadGrid2.DataSource = controldes.ListarDespacho_informePorOTAgrupada(txtNombreOT.Text, txtNumeroOT.Text, fi, ft, 3);
                    RadGrid2.DataBind();


                    ibPDF.Visible = false;
                }
            }
        }
        public void CargarDatos()
        {
            Controller_EstadoOT eo = new Controller_EstadoOT();

            lblOT.Text = Request.QueryString["OT"];
            Intranet.ModuloDespacho.Model.Estado_OT et = eo.BuscarOTLiquidar(Request.QueryString["OT"], 1);
            lblNombreOT.Text = et.NombreOT;
            lblCliente.Text  = et.Cliente;
            if (et.FechaMaxima != "")
            {
                lblFechaLiqui.Text = Convert.ToDateTime(et.FechaMaxima).ToString("dd-MM-yyyy");
            }

            Controller_Liquidacion controlliqui = new Controller_Liquidacion();

            RadGrid1.DataSource = controlliqui.ListarHistorialLiquidacion(Request.QueryString["OT"]);
            RadGrid1.DataBind();
            RadGrid3.DataSource = controlliqui.ListarHistorialNotas(Request.QueryString["OT"]);
            RadGrid3.DataBind();
            RadGridfacturacion.DataSource = controlliqui.ListarDetalleFacturacion(Request.QueryString["OT"]);
            RadGridfacturacion.DataBind();

            ddlProblema.DataSource     = controlliqui.ListarDetalle();
            ddlProblema.DataTextField  = "OT";
            ddlProblema.DataValueField = "TotalDesp";
            ddlProblema.DataBind();
            ddlProblema.Items.Insert(0, new ListItem("Seleccionar", "Seleccionar"));
            ddlProblema.Attributes.Add("disabled", "disabled");

            RadGrid2.DataSource = controlliqui.ListarDespachos(Request.QueryString["OT"], 0);
            RadGrid2.DataBind();

            lblTabla.Text = controlliqui.ListaDetalleDespachos(Request.QueryString["OT"], 1);
            //string CSR = de.NombreOT;
        }
예제 #3
0
        protected void ddlCausa_SelectedIndexChanged(object sender, EventArgs e)
        {
            string res = BuscarPallet();

            if (res.Length > 0)
            {
                if (RadGrid2.Items.Count == 0)
                {
                    PanelCantidad.Visible = true;
                    RadGrid2.DataSource   = "";
                    RadGrid2.DataBind();
                    List <string> pallet   = new List <string>();
                    int           cantidad = 0;
                    for (int i = 0; i < RadGridOT.Items.Count; i++)
                    {
                        GridDataItem row       = RadGridOT.Items[i];
                        bool         isChecked = ((CheckBox)row.FindControl("chkSelect")).Checked;

                        if (isChecked)
                        {
                            pallet.Add(row["ID_Control"].Text);
                            cantidad = cantidad + Convert.ToInt32(row["Pliegos_Impresos"].Text);
                        }
                    }
                    ddlPliego.DataSource = pallet;
                    ddlPliego.DataBind();
                    ddlPliego.Items.Insert(0, new ListItem("Seleccione..."));
                    lblRestantes.Text = cantidad.ToString("N0").Replace(",", ".");
                    pnlOT.Visible     = false;
                }
            }
        }
예제 #4
0
    //protected void Page_PreRender(object sender, EventArgs e)
    //{
    //    if (RadGrid2.SelectedIndexes.Count == 0)
    //        RadGrid2.SelectedIndexes.Add(0);
    //    if (RadGrid3.SelectedIndexes.Count == 0)
    //    {
    //        RadGrid3.Rebind();
    //        RadGrid3.SelectedIndexes.Add(0);
    //    }
    //}

    //protected void RadGrid2_ItemCommand(object sender, GridCommandEventArgs e)
    //{
    //    RadGrid3.SelectedIndexes.Clear();
    //}

    protected void RadComboBox1_DataBound(object sender, EventArgs e)
    {
        SqlDataSource2.SelectParameters[0].DefaultValue = RadComboBox1.SelectedValue.ToString();
        SqlDataSource3.SelectParameters[0].DefaultValue = RadComboBox1.SelectedValue.ToString();

        RadGrid2.Rebind();
    }
    protected void radCompany_Search(object sender, SearchBoxEventArgs e)
    {
        RadSearchBox searchBox = (RadSearchBox)sender;

        string companyId = string.Empty;
        string likeCondition;
        Guid   compId = new Guid();

        if (e.DataItem != null)
        {
            companyId = ((Dictionary <string, object>)e.DataItem)["CompanyId"].ToString();
            compId    = Guid.Parse(companyId);
            if (!string.IsNullOrEmpty(companyId))
            {
                likeCondition       = string.Format("'{0}{1}%'", searchBox.Filter == SearchBoxFilter.Contains ? "%" : "", ((Dictionary <string, object>)e.DataItem)["CompanyId"].ToString());
                RadGrid2.DataSource = GetCompanyById(compId);
                RadGrid2.DataBind();
            }
        }
        else
        {
            RadGrid2.DataSource = GetCompany();
            RadGrid2.DataBind();
        }
    }
        protected void btnBuscar_Click(object sender, EventArgs e)
        {
            string usu = Session["Usuario"].ToString();

            if (txtNombreProyecto.Text != "")
            {
                res = cp.BuscarDisponibilidadyCrear(usu, txtNombreProyecto.Text, "", 1);
                if (res == false)
                {
                    RadGrid1.DataSource = cp.CargarGrillaProyecto(usu, txtNombreProyecto.Text, "", "", "", 0, 0);
                    RadGrid1.DataBind();

                    RadGrid2.DataSource = cp.CargarGrillaProyecto(usu, txtNombreProyecto.Text, "", "", "", 0, 3);
                    RadGrid2.DataBind();



                    DivOculto.Visible = true;
                    btnFiltro.Enabled = false;
                }
                else
                {
                    DivOculto.Visible    = false;
                    divMensaje.Visible   = true;
                    btnFiltro.Enabled    = true;
                    lblMensaje.Text      = "El proyecto que ha buscado NO existe.";
                    imgMensaje.ImageUrl  = "../../Images/cross.png";
                    lblMensaje.ForeColor = Color.White;
                    divMensaje.Attributes.Add("style", "background-color:Red");
                }
            }
        }
예제 #7
0
    protected void post_Click(object sender, EventArgs e)
    {
        if (RadTextBox1.Text == "")
        {
        }
        else
        {
            Db     dbClass = new Db();
            string l       = RadGrid2.Columns.FindByUniqueName("loadit").FooterText;
            string s       = Session["UserID"].ToString();
            int    f       = int.Parse(s);
            int    itemid  = int.Parse(l);
            string me      = "INSERT INTO Comments (ItemID, UID, Comment)VALUES ('" + l + "', " + f + ", '" + RadTextBox1.Text.ToString() + "')";
            dbClass.DataBase(me);

            bindit();
            RadGrid1.DataBind();
            lblstatus.Visible = false;
            RadGrid2.Columns.FindByUniqueName("loadit").FooterText = l;
            RadGrid2.DataSource = dt;
            RadGrid2.DataBind();
            vaibhav.Visible  = true;
            RadTextBox1.Text = "";
        }
    }
예제 #8
0
        public void document_attachment_GetAll2(int idRespuesta)
        {
            OrdenController oc = new OrdenController();

            RadGrid2.DataSource = oc.Seguimiento_MostrarArchivos(0, idRespuesta, 2);
            RadGrid2.DataBind();
        }
예제 #9
0
        public void CargarGrillaFecha()
        {
            List <Intranet.ModuloProduccion.Model.Produccion> lista = control.List_CSR(Session["Usuario"].ToString(), "", "", null, null, 1);

            RadGrid2.DataSource = lista;
            RadGrid2.DataBind();
        }
        protected void radSearchEmployee_Search(object sender, SearchBoxEventArgs e)
        {
            RadSearchBox searchBox = (RadSearchBox)sender;

            string employeeId = string.Empty;
            string likeCondition;
            Guid   empId = new Guid();

            if (e.DataItem != null)
            {
                employeeId = ((Dictionary <string, object>)e.DataItem)["EmployeeId"].ToString();
                empId      = Guid.Parse(employeeId);
                if (!string.IsNullOrEmpty(employeeId))
                {
                    likeCondition = string.Format("'{0}{1}%'", searchBox.Filter == SearchBoxFilter.Contains ? "%" : "", ((Dictionary <string, object>)e.DataItem)["EmployeeId"].ToString());
                    //gridEmployeeDataSource.SelectCommand = "SELECT [EmployeeId], [FirstName] , [MiddleName], [LastName], [BirthDate], [ContactNo], [Email], [CreatedDate]" + " FROM[Employee] WHERE RecordStatus = 1 AND [" + searchBox.DataValueField + "] LIKE " + likeCondition;
                    //RadGrid2.DataBind();
                    RadGrid2.DataSource = GetEmployeebyEmployeeId(empId);
                    //RadGrid2.DataSource = "SELECT [EmployeeId], [FirstName] , [MiddleName], [LastName], [BirthDate], [ContactNo], [Email], [CreatedDate]" + " FROM [Employee] WHERE RecordStatus = 1 and FirstName = [" + searchBox.Text + "] OR LastName = [" + searchBox.Text + "] or BirthDate = [" + searchBox.Text + "] ";
                    RadGrid2.DataBind();
                    // string search = radSearchEmployee.Text;
                }
            }
            else
            {
                RadGrid2.DataSource = GetEmployee();
                RadGrid2.DataBind();
            }
        }
예제 #11
0
 protected void RadGrid1_SelectedIndexChanged(object sender, EventArgs e)
 {
     lblidCliente.Text    = RadGrid1.SelectedValues["id_cliente"].ToString();
     PanelDetalle.Visible = true;
     FormView1.DataBind();
     RadGrid2.DataBind();
 }
예제 #12
0
        protected void RadGrid2_ItemCommand(object source, GridCommandEventArgs e)
        {
            if ((e.CommandName == "PerformInsert") || (e.CommandName == "Update"))
            {
                GridEditFormItem item = (GridEditFormItem)e.Item;
                int pathroutekey      = 0;
                if (e.CommandName == "Update")
                {
                    pathroutekey = Convert.ToInt32(item.GetDataKeyValue("path_route_key"));
                }
                int pathkey   = Convert.ToInt32(hdpathkey.Value);
                int marketkey = Convert.ToInt32((item["market_key2"].FindControl("ddlmarket") as RadComboBox).SelectedValue);

                Bitcoin_Notify_DB.SPs.UpdatePathRoute(pathroutekey, pathkey, marketkey).Execute();

                RadGrid2.MasterTableView.ClearEditItems();
                //string firstname = (item["first_name"].Controls[0] as TextBox).Text;
            }
            else if (e.CommandName == "Delete")
            {
                GridDataItem item         = (GridDataItem)e.Item;
                int          pathroutekey = Convert.ToInt32(item.GetDataKeyValue("path_route_key"));

                Bitcoin_Notify_DB.SPs.DeletePathRoute(pathroutekey).Execute();

                RadGrid2.Rebind();
                //int userkey = Convert.ToInt32(item["user_key"].Text);
            }
        }
        protected void radSearchawbIssuance_Search(object sender, SearchBoxEventArgs e)
        {
            RadSearchBox searchBox = (RadSearchBox)sender;

            string id = string.Empty;
            string likeCondition;
            Guid   awbId = new Guid();
            Guid   bcoId = new Guid();

            if (e.DataItem != null)
            {
                // id = ((Dictionary<string, object>)e.DataItem)["AwbIssuanceId"].ToString();
                var dataItem      = ((Dictionary <string, object>)e.DataItem);
                var awbIssuanceId = dataItem["AwbIssuanceId"].ToString();
                var bco           = dataItem["BCOid"].ToString();
                awbId = Guid.Parse(awbIssuanceId);
                bcoId = Guid.Parse(bco);
                if (!string.IsNullOrEmpty(id))
                {
                    likeCondition       = string.Format("'{0}{1}%'", searchBox.Filter == SearchBoxFilter.Contains ? "%" : "", ((Dictionary <string, object>)e.DataItem)["AwbIssuanceId"].ToString());
                    RadGrid2.DataSource = GetAwbIssuanceById(bcoId, awbId);
                    RadGrid2.DataBind();
                }
            }
            else
            {
                RadGrid2.DataSource = GetAWBIssuance();
                RadGrid2.DataBind();
            }
        }
예제 #14
0
 private void limpiaCampos()
 {
     lblError.Text              = "";
     ddlPais.Text               = "";
     ddlPais.SelectedIndex      = -1;
     ddlEstado.Text             = "";
     ddlEstado.SelectedIndex    = -1;
     ddlMunicipio.Text          = "";
     ddlMunicipio.SelectedIndex = -1;
     ddlColonia.Text            = "";
     ddlColonia.SelectedIndex   = -1;
     ddlCodigo.Text             = "";
     ddlCodigo.SelectedIndex    = -1;
     txtRazonNew.Text           = "";
     txtLocalidad.Text          = "";
     txtReferenciaMod.Text      = "";
     txtRfcCap.Text             = "";
     txtCalle.Text              = "";
     txtNoExt.Text              = "";
     txtNoIntMod.Text           = "";
     txtCorreo.Text             = "";
     txtCorreoCC.Text           = "";
     txtCorreoCCO.Text          = "";
     facDatos.borrar(Request.QueryString["u"]);
     RadGrid1.Rebind();
     RadGrid2.Rebind();
     // lblUsuario.Text = lblTotal.Text = lblSubTotal.Text = lblIVA.Text = lblHora.Text = lblFecha.Text = lblNeto.Text = lblDesceunto.Text = lblDescuentoPorc.Text = "";
 }
예제 #15
0
        protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
        {
            if ((e.CommandName == "PerformInsert") || (e.CommandName == "Update"))
            {
                GridEditFormItem item = (GridEditFormItem)e.Item;
                int pathkey           = 0;
                if (e.CommandName == "Update")
                {
                    pathkey = Convert.ToInt32(item.GetDataKeyValue("path_key"));
                }
                int order = Convert.ToInt32((item["page_order"].Controls[0] as TextBox).Text);

                Bitcoin_Notify_DB.SPs.UpdatePath(pathkey, order).Execute();

                RadGrid1.MasterTableView.ClearEditItems();
            }
            else if (e.CommandName == "Route")
            {
                GridDataItem item     = (GridDataItem)e.Item;
                int          pathkey  = Convert.ToInt32(item["path_key"].Text);
                string       pathname = item["path_name"].Text;
                hdpathkey.Value = pathkey.ToString();
                lblpath.Text    = pathkey.ToString() + " - " + pathname;
                RadGrid2.Rebind();
            }
            else if (e.CommandName == "Delete")
            {
                GridDataItem item    = (GridDataItem)e.Item;
                int          pathkey = Convert.ToInt32(item.GetDataKeyValue("path_key"));

                Bitcoin_Notify_DB.SPs.DeletePath(pathkey).Execute();
                RadGrid1.MasterTableView.ClearEditItems();
            }
        }
예제 #16
0
        protected void btnAgregar_Click(object sender, EventArgs e)
        {
            if (ddlTipoEmbalaje.SelectedValue.ToString() != "Seleccione..." && txtCantidad.Text != "")
            {
                if ((Convert.ToInt32(lblRestante.Text) - Convert.ToInt32(txtCantidad.Text)) >= 0)
                {
                    respuesta = des.insertTipoDev(Convert.ToInt32(idDev.Text), txtOT.Text, ddlTipoEmbalaje.SelectedValue.ToString(), Convert.ToInt32(txtCantidad.Text), 2);
                    if (respuesta == true)
                    {
                        //actualizar grilla

                        RadGrid2.DataSource = des.ListaTipos(Convert.ToInt32(idDev.Text));
                        RadGrid2.DataBind();
                        //totalDevuelto = totalDevuelto + Convert.ToInt32(txtCantidad.Text);
                        lblMensaje.Text = "";

                        lblRestante.Text = des.MaxRecepciones(txtOT.Text, 1);

                        btnAgregar.Enabled = false;
                    }
                    else
                    {
                        //error o algo
                    }
                }
                else
                {
                    lblMensaje.ForeColor = Color.Red;
                    lblMensaje.Text      = "La cantidad recepcionada no puede ser mayor a 'Maximo a recepcionar'.";
                }
            }
        }
        protected void btnFiltro_Click1(object sender, EventArgs e)
        {
            if (txtFechaInicio.Text != "" || txtFechaTermino.Text != "")
            {
                DateTime a = Convert.ToDateTime(txtFechaInicio.Text);
                string   b = a.ToString("MM/dd/yyyy");
                DateTime c = Convert.ToDateTime(txtFechaTermino.Text);
                string   d = c.ToString("MM/dd/yyyy");

                DateTime FI = Convert.ToDateTime(b + " 00:00:00");
                DateTime FT = Convert.ToDateTime(d + " 23:59:59");

                RadGrid1.DataSource = cID.controlRecepcionPendientes(txtOP.Text, txtNombreOP.Text, FI, FT, 0);

                RadGrid2.DataSource = cID.controlRecepcionPendientes(txtOP.Text, txtNombreOP.Text, FI, FT, 2);
            }
            else
            {
                DateTime FI = Convert.ToDateTime("1900-01-01 00:00:00");
                DateTime FT = Convert.ToDateTime("1900-01-01 23:59:59");

                RadGrid1.DataSource = cID.controlRecepcionPendientes(txtOP.Text, txtNombreOP.Text, FI, FT, 1);

                RadGrid2.DataSource = cID.controlRecepcionPendientes(txtOP.Text, txtNombreOP.Text, FI, FT, 3);
            }
            RadGrid1.DataBind();
            RadGrid2.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                try
                {
                    txtFecha.DbSelectedDate = Request.QueryString["fecha"].ToString().Substring(0, 2) + "/" + Request.QueryString["fecha"].ToString().Substring(2, 2) + "/" + Request.QueryString["fecha"].ToString().Substring(4, 4);
                    txtOrden.Text           = Request.QueryString["orden"].ToString();
                    RadGrid1.Rebind();
                    RadGrid2.Rebind();

                    double ancho = 0;
                    foreach (GridColumn gc in RadGrid1.Columns)
                    {
                        if (gc.Display)
                        {
                            ancho = ancho + gc.HeaderStyle.Width.Value;
                        }
                    }
                    RadGrid1.Width = Unit.Pixel(Convert.ToInt32(ancho) + 20);
                    RadGrid1.MasterTableView.Width = Unit.Pixel(Convert.ToInt32(ancho));
                }
                catch (Exception ex)
                {
                    ErrorManager(ex, new System.Diagnostics.StackTrace().GetFrame(0).GetMethod().Name);
                }
            }
        }
예제 #19
0
        protected void radSearchUser_Search(object sender, SearchBoxEventArgs e)
        {
            RadSearchBox searchBox = (RadSearchBox)sender;

            string userId = string.Empty;
            string likeCondition;
            Guid   userid = new Guid();

            if (e.DataItem != null)
            {
                userId = ((Dictionary <string, object>)e.DataItem)["UserId"].ToString();
                userid = Guid.Parse(userId);
                if (!string.IsNullOrEmpty(userId))
                {
                    likeCondition       = string.Format("'{0}{1}%'", searchBox.Filter == SearchBoxFilter.Contains ? "%" : "", ((Dictionary <string, object>)e.DataItem)["UserId"].ToString());
                    RadGrid2.DataSource = GetUserbyUserId(userid);
                    RadGrid2.DataBind();
                }
            }
            else
            {
                RadGrid2.DataSource = GetUsers();
                RadGrid2.DataBind();
            }
        }
예제 #20
0
    protected void RadComboBox1_DataBound(object sender, EventArgs e)
    {
        DateTime?day0 = DateTime.Parse(RadComboBox1.SelectedValue.ToString());
        DateTime?day1 = day0.Value.AddDays(1);
        DateTime?day2 = day0.Value.AddDays(2);
        DateTime?day3 = day0.Value.AddDays(3);
        DateTime?day4 = day0.Value.AddDays(4);
        DateTime?day5 = day0.Value.AddDays(5);
        DateTime?day6 = day0.Value.AddDays(6);

        SqlDataSource2.SelectParameters[0].DefaultValue = RadComboBox1.SelectedValue.ToString();

        RadGrid2.MasterTableView.Columns[3].HeaderText = day0.Value.ToShortDateString();
        RadGrid2.MasterTableView.Columns[4].HeaderText = day1.Value.ToShortDateString();
        RadGrid2.MasterTableView.Columns[5].HeaderText = day2.Value.ToShortDateString();
        RadGrid2.MasterTableView.Columns[6].HeaderText = day3.Value.ToShortDateString();
        RadGrid2.MasterTableView.Columns[7].HeaderText = day4.Value.ToShortDateString();
        RadGrid2.MasterTableView.Columns[8].HeaderText = day5.Value.ToShortDateString();
        RadGrid2.MasterTableView.Columns[9].HeaderText = day6.Value.ToShortDateString();
        RadGrid2.Rebind();

        SqlDataSource3.SelectParameters[0].DefaultValue = RadComboBox1.SelectedValue.ToString();
        RadGrid3.Rebind();

        SqlDataSource4.SelectParameters[0].DefaultValue = RadComboBox1.SelectedValue.ToString();
        RadGrid4.Rebind();

        SqlDataSource5.SelectParameters[0].DefaultValue = RadComboBox1.SelectedValue.ToString();
        RadGrid5.Rebind();
    }
예제 #21
0
        public void CargarGrillas()
        {
            string FechaInicio  = "";
            string FechaTermino = "";

            if (txtFechaInicio.Text != "" && txtFechaTermino.Text != "")
            {
                string   FecI = txtFechaInicio.Text;
                string[] str  = FecI.Split('/');
                string   dia  = str[0];
                string   mes  = str[1];
                string   año  = str[2];
                año         = año.Substring(0, 4);
                FechaInicio = mes + "/" + dia + "/" + año;

                string   FecT = txtFechaTermino.Text;
                string[] str2 = FecT.Split('/');
                string   dia2 = str2[0];
                string   mes2 = str2[1];
                string   año2 = str2[2];
                año2         = año2.Substring(0, 4);
                FechaTermino = mes2 + "/" + dia2 + "/" + año2;
            }
            List <Intranet.ModuloProduccion.Model.Produccion> lista = control.ListarProduccion(txtNumeroOT.Text.ToString().Trim(), txtNombreOT.Text.ToString().Trim(), txtCliente.Text.ToString().Trim(), 1, FechaInicio.Trim(), FechaTermino.Trim());

            RadGrid1.DataSource = lista;
            RadGrid1.DataBind();
            List <Intranet.ModuloProduccion.Model.Produccion> lista2 = control.ListarProduccion(txtNumeroOT.Text.ToString().Trim(), txtNombreOT.Text.ToString().Trim(), txtCliente.Text.ToString().Trim(), 2, FechaInicio.Trim(), FechaTermino.Trim());

            RadGrid2.DataSource = lista2;
            RadGrid2.DataBind();
        }
예제 #22
0
 protected void lnkEliminarEntrada_Click(object sender, EventArgs e)
 {
     lblError.Text = "";
     try
     {
         LinkButton btn      = (LinkButton)sender;
         string     id       = btn.CommandArgument.ToString();
         Entradas   entradas = new Entradas();
         entradas.entrada = Convert.ToInt32(id);
         entradas.tienda  = Convert.ToInt32(RadGrid1.SelectedValues["id_punto"].ToString());
         entradas.eliminarEntrada();
         if (Convert.ToBoolean(entradas.retorno[0]))
         {
             lblError.Text = "Entrada Eliminada Existosamente";
             RadGrid2.Rebind();
         }
         else
         {
             lblError.Text = "Error al eliminar la entrada. Detalle: " + Convert.ToString(entradas.retorno[1]);
         }
     }
     catch (Exception ex)
     {
         lblError.Text = "Error al eliminar la entrada. Detalle: " + ex.Message;
     }
 }
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            Guid bcoId             = new Guid();
            Guid revenueUnitTypeId = new Guid();
            Guid rUnitId           = new Guid();

            bcoId             = Guid.Parse(rcbBranchCorpOffice.SelectedValue.ToString());
            revenueUnitTypeId = Guid.Parse(rcbRevenueUnitType.SelectedValue.ToString());
            rUnitId           = Guid.Parse(rcbRevenueUnitName.SelectedValue.ToString());

            if (bcoId != null && revenueUnitTypeId != null && rUnitId != null)
            {
                RadGrid2.DataSource = GetEmployeebySearch(bcoId, revenueUnitTypeId, rUnitId);
                RadGrid2.DataBind();
            }

            //radSearchEmployee.Text = "";
            //string host = HttpContext.Current.Request.Url.Authority;
            //Guid ID = new Guid("11111111-1111-1111-1111-111111111111");
            //string batchCode = GlobalCode.globalCode;
            //BLL.Batch.InsertBatchName(txtBatchName.Text, batchCode, ID, getConstr.ConStrCMS);

            //string script = "<script>CloseOnReload()</" + "script>";
            //ClientScript.RegisterStartupScript(this.GetType(), "CloseOnReload", script);
        }
예제 #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string codigo = Request.QueryString["Cod"];

            Devoluciones d = des.ListaDevoluciones(codigo);

            lblOT.Text          = d.OT.ToUpper();
            lblCliente.Text     = d.Cliente;
            lblProducto.Text    = d.Producto;
            lblCausa.Text       = d.CausaDevolucion;
            lblObservacion.Text = d.Observacion;

            int can = Convert.ToInt32(d.Total_Dev);

            lblCantidad.Text = can.ToString("N0").Replace(",", ".");

            int tir = Convert.ToInt32(d.TirajeOT);

            lblTirajeOT.Text = tir.ToString("N0").Replace(",", ".");



            RadGrid1.DataSource = des.ListaGuias(Convert.ToInt32(d.id_Guias));
            RadGrid1.DataBind();


            RadGrid2.DataSource = des.ListasTipos(Convert.ToInt32(d.id_TipoDev));
            RadGrid2.DataBind();
        }
예제 #25
0
    protected void RadButton4_Click(object sender, EventArgs e)
    {
        DataTable dt;

        foreach (UploadedFile f in RadAsyncUpload2.UploadedFiles)
        {
            string path = Server.MapPath("~/Uploads/");
            //f.File.SaveAs(path + f.File.GetName());
            var filename = f.FileName;

            dt = ReadExcelFile("Sheet1", path + filename);

            RadGrid2.DataSource = dt;
            RadGrid2.DataBind();
            //string path = f.ContentLength
            //f.File.SaveAs(path + e.File.GetName());

            //var getvar = f.GetName();


            //var filesize = Convert.ToInt32(f.ContentLength);
            //var physicalSavePath = MapPath(relativePath) + filename;
            //f.SaveAs("c:\\uploaded files\\" + f.GetName(), true);
        }
    }
예제 #26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            RadGrid1.DataSource = "";
            RadGrid1.DataBind();

            RadGrid2.DataSource = "";
            RadGrid2.DataBind();
        }
        protected void ddlArea_SelectedIndexChanged(object sender, EventArgs e)
        {
            TabPanel2.Enabled = true;

            //Label1.Text= ddlArea.SelectedValue.ToString();
            RadGrid2.DataSource = cc.ListarCCAsignados(8, Convert.ToInt32(ddlArea.SelectedValue.ToString()));
            RadGrid2.DataBind();
        }
예제 #28
0
    private void ViewWidgetAll2(int _pagelayout, string regionId)
    {
        SYS_WidgetPageLayoutBSO _widgetBSO = new SYS_WidgetPageLayoutBSO();
        DataTable table = _widgetBSO.GetSYS_WidgetPageLayoutByAllRegionId(regionId, _pagelayout, Language.language);

        RadGrid2.DataSource = table;
        RadGrid2.DataBind();
    }
예제 #29
0
    protected void ddlRegion2_SelectedIndexChanged(object sender, EventArgs e)
    {
        SYS_WidgetPageLayoutBSO _widgetBSO = new SYS_WidgetPageLayoutBSO();
        DataTable table = _widgetBSO.GetSYS_WidgetPageLayoutByAllRegionId(ddlRegion2.SelectedValue, Convert.ToInt32(ddlPageLayout2.SelectedValue), Language.language);

        RadGrid2.DataSource = table;
        RadGrid2.DataBind();
    }
예제 #30
0
        protected void PresentTeachrBtn_Click(object sender, EventArgs e)
        {
            substituteDA mysub2;
            {
                try
                {
                    DataTable dt2       = new DataTable();
                    string    dayofweek = System.DateTime.Now.DayOfWeek.ToString();
                    if (dayofweek == "Monday")
                    {
                        mysub2 = new substituteDA();
                        dt2    = mysub2.presentTeachersMon();
                        RadGrid2.DataSource = dt2;
                        RadGrid2.DataBind();
                    }


                    if (dayofweek == "Tuesday")
                    {
                        mysub2 = new substituteDA();
                        dt2    = mysub2.presentTeachersTues();
                        RadGrid2.DataSource = dt2;
                        RadGrid2.DataBind();
                    }

                    if (dayofweek == "Wednesday")
                    {
                        mysub2 = new substituteDA();
                        dt2    = mysub2.presentTeachersWed();
                        RadGrid2.DataSource = dt2;
                        RadGrid2.DataBind();
                    }

                    if (dayofweek == "Thursday")
                    {
                        mysub2 = new substituteDA();
                        dt2    = mysub2.presentTeachersThus();
                        RadGrid2.DataSource = dt2;
                        RadGrid2.DataBind();
                    }


                    if (dayofweek == "Friday")//select present teachers from db and they are set to display in the radgrid
                    {
                        mysub2 = new substituteDA();
                        dt2    = mysub2.presentTeachersFri();
                        substituteCLZ obj1 = new substituteCLZ();
                        RadGrid2.DataSource = dt2;
                        RadGrid2.DataBind();
                    }
                }

                catch (Exception ex)
                {
                    throw ex;
                }
            }
        }