Exemplo n.º 1
0
        protected void RadTreeView1_Nodeclick(object sender, RadTreeNodeEventArgs e)
        {
            var dt = new object();

            if (e.Node.Level.Equals(0))
            {
                dt = _entities.GetCVUngVienByIDTuyendung(Int32.Parse(e.Node.Value));
            }
            else
            {
                dt = _entities.GetCVUngVienByVongTuyendung(Int32.Parse(e.Node.Value));
            }

            RadGrid1.DataSource = dt;
            RadGrid1.DataBind();

            if (RadGrid1.Items.Count > 0)
            {
                RadGrid1.Items[0].Selected = true;
                GridDataItem item       = RadGrid1.Items[0];
                Int32        IDNhanVien = Int32.Parse(item["IDNhanVien"].Text);
                FillCurrentEmployeeDetail(IDNhanVien);
                RadContextMenu1.Items.FindItemByValue("xoa").Enabled = true;
                RadContextMenu1.Items.FindItemByValue("sua").Enabled = true;
                CheckPermis();
            }
            else
            {
                RadContextMenu1.Items.FindItemByValue("xoa").Enabled = false;
                RadContextMenu1.Items.FindItemByValue("sua").Enabled = 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;
        }
    private void BindGrid()
    {
        DataTable    dt  = new DataTable();
        DBconnection obj = new DBconnection();

        obj.SetCommandQry = "SELECT * FROM [View_DistPositionHeldMembers] WHERE ([district_no] = '3141') Order by club_name, name, years";

        dt = obj.ExecuteTable();
        if (dt.Rows.Count > 0)
        {
            lblMsg.Visible           = false;
            btnExporttoExcel.Visible = true;
            RadGrid1.Visible         = true;
            RadGrid1.DataSourceID    = string.Empty;
            RadGrid1.DataSource      = dt;
            RadGrid1.DataBind();
        }
        else
        {
            lblMsg.Visible = true;
            //rbtnType.Visible = false;
            btnExporttoExcel.Visible = false;
            RadGrid1.Visible         = false;
        }
    }
        public void CargarDatos()
        {
            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;
            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;

            if (fechaInicio == fechaTermino)
            {
                fechaInicio  = fechaInicio + " 00:00:00";
                fechaTermino = fechaTermino + " 23:59:59";
            }
            RadGrid1.DataSource = controlDes.sp_ListarFuturos_Mostrar("", "", "", fechaInicio, fechaTermino, 0);
            RadGrid1.DataBind();
        }
Exemplo n.º 5
0
        public void CargarGrilla()
        {
            List <Intranet.ModuloProduccion.Model.Produccion> lista = control.ListOT_Creadas_CSR(Session["Usuario"].ToString(), "", "", "", null, null, 1);

            RadGrid1.DataSource = lista;
            RadGrid1.DataBind();
        }
Exemplo n.º 6
0
        void CargaGrid()
        {
            try
            {
                AlumnoEnt        oAlumnoEnt  = new AlumnoEnt();
                List <AlumnoEnt> oAlumnos    = new List <AlumnoEnt>();
                AlumnosBus       oAlumnosBus = new AlumnosBus();

                oAlumnoEnt.sNombres         = ViewState["sNombre"].ToString();
                oAlumnoEnt.sAPaterno        = ViewState["sPaterno"].ToString();
                oAlumnoEnt.sAMaterno        = ViewState["sMaterno"].ToString();
                oAlumnoEnt.sNumeroMatricula = ViewState["sMatricula"].ToString();
                oAlumnoEnt.sFechaNacimiento = ViewState["sFechaNacimiento"].ToString();
                oAlumnoEnt.sEstatus         = ViewState["sEstatus"].ToString();


                oAlumnos            = oAlumnosBus.ListaAlumnos(oAlumnoEnt);
                RadGrid1.DataSource = oAlumnos;
                RadGrid1.DataBind();
            }
            catch (Exception ex)
            {
                // lblMessage.Text = ex.Message;
            }
        }
Exemplo n.º 7
0
        public void document_attachment_GetAll(int idmensaje)
        {
            OrdenController oc = new OrdenController();

            RadGrid1.DataSource = oc.Seguimiento_MostrarArchivos(idmensaje, 0, 1);
            RadGrid1.DataBind();
        }
Exemplo n.º 8
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();
        }
        public void CargarGrillaFecha_Filtro()
        {
            string fechaI = DateTime.Now.ToString("dd/MM/yyyy");

            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 = DateTime.Now.ToString("dd/MM/yyyy");

            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 + " 23:59:59";

            RadGrid1.DataSource = controldes.ListarDespacho_informePorOTAgrupada("", "", fechaInicio, fechaTermino, 2);
            RadGrid1.DataBind();
        }
        public void bindRadGrid1()
        {
            DataTable        dtVariant        = new DataTable();
            DataSet          dsVariantDetails = new DataSet();
            DataTable        dtModel          = new DataTable();
            ModelPortfolioBo modelPortfolioBo = new ModelPortfolioBo();

            dsVariantDetails = modelPortfolioBo.GetVariantAssetPortfolioDetails(advisorVo.advisorId);

            dtVariant.Columns.Add("XAMP_ModelPortfolioCode");
            dtVariant.Columns.Add("XAMP_ModelPortfolioName");
            dtVariant.Columns.Add("XAMP_ROR");
            dtVariant.Columns.Add("XAMP_RiskPercentage");

            DataRow drVariant;

            foreach (DataRow dr in dsVariantDetails.Tables[0].Rows)
            {
                drVariant = dtVariant.NewRow();
                drVariant["XAMP_ModelPortfolioCode"] = dr["XAMP_ModelPortfolioCode"].ToString();
                drVariant["XAMP_ModelPortfolioName"] = dr["XAMP_ModelPortfolioName"].ToString();
                drVariant["XAMP_ROR"]            = dr["XAMP_ROR"].ToString();
                drVariant["XAMP_RiskPercentage"] = dr["XAMP_RiskPercentage"].ToString();
                dtVariant.Rows.Add(drVariant);
            }
            RadGrid1.DataSource   = dtVariant;
            RadGrid1.DataSourceID = String.Empty;
            RadGrid1.DataBind();
        }
Exemplo n.º 11
0
        protected void btnProcessVoid_Click(object sender, EventArgs e)
        {
            try
            {
                string invoiceNo = lblInvoiceNo.Text;

                if (InvoiceService.HasPayments(lblInvoiceNo.Text))
                {
                    WebFormHelper.SetLabelTextWithCssClass(lblStatusAddEdit,
                                                           String.Format("Invoice {0} has active payments. Please void all of the payments first.", invoiceNo),
                                                           LabelStyleNames.ErrorMessage);
                    return;
                }


                InvoiceService.VoidInvoice(invoiceNo, txtVoidReason.Text);
                mvwForm.SetActiveView(viwRead);
                ResetControls();
                WebFormHelper.SetLabelTextWithCssClass(lblStatus,
                                                       String.Format("Invoice {0} has been marked as void", invoiceNo),
                                                       LabelStyleNames.InfoMessage);
                RadGrid1.DataBind();
            }
            catch (Exception ex)
            {
                WebFormHelper.SetLabelTextWithCssClass(lblStatus, ex.Message, LabelStyleNames.ErrorMessage);
            }
        }
        public void CargarRegistros()
        {
            string Maquina = "";

            if (ddlMaquina.SelectedValue != "Todas")
            {
                Maquina = ddlMaquina.SelectedValue;
            }
            string FI = "";
            string FT = "";

            if (txtFechaInicio.Text != "" && txtFechaTermino.Text != "")
            {
                string[] str1 = txtFechaInicio.Text.Split('/');
                FI = str1[2] + "-" + str1[1] + "-" + str1[0];
                string[] str2 = txtFechaTermino.Text.Split('/');
                FT = str2[2] + "-" + str2[1] + "-" + str2[0];
            }
            if (txtNombreOT.Text == "" && txtNumeroOT.Text == "" && txtFechaInicio.Text == "" && txtFechaTermino.Text == "" && ddlMaquina.SelectedValue == "Todas")
            {
                FI = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
                FT = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
            }
            lista = controlbob.List_BodegaPerd(txtNumeroOT.Text, Maquina, txtTipPapel.Text, FI, FT);
            RadGrid1.DataSource = lista;
            RadGrid1.DataBind();
        }
Exemplo n.º 13
0
        protected void btnFiltro_Click1(object sender, EventArgs e)
        {
            if (txtPapel.Text != "" || txtGramaje.Text != "" && txtAncho.Text != "")
            {
                string ot         = Request.QueryString["ot"];
                string componente = Request.QueryString["comp"];
                string papel      = txtPapel.Text;
                string certi      = ddlCertificacion.SelectedValue.ToString();
                if (certi == "Seleccione...")
                {
                    certi = "";
                }

                int gramaje = 0;
                if (txtGramaje.Text != "")
                {
                    gramaje = Convert.ToInt32(txtGramaje.Text);
                }
                int ancho = 0;
                if (txtAncho.Text != "")
                {
                    ancho = Convert.ToInt32(txtAncho.Text);
                }
                int Largo = 0;
                if (txtLargo.Text != "")
                {
                    Largo = Convert.ToInt32(txtLargo.Text);
                }
                string preid = Request.QueryString["preid"];

                RadGrid1.DataSource = bp.BuscaStockBodegaPliegos(ot, componente, certi, txtMarca.Text, "", papel, gramaje, ancho, Largo, Convert.ToInt32(Request.QueryString["solFL"]), Convert.ToInt32(Request.QueryString["solKG"]), preid, Request.QueryString["usuario"], 0);
                RadGrid1.DataBind();
            }
        }
Exemplo n.º 14
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 = "";
        }
    }
Exemplo n.º 15
0
        protected void btnFiltro_Click1(object sender, EventArgs e)
        {
            try
            {
                if (ddlMaquina.SelectedValue.ToString() != "" || ddlMes.SelectedValue.ToString() != "" || ddlAño.SelectedValue.ToString() != "")
                {
                    int      ultimodia = DateTime.DaysInMonth(Convert.ToInt32(ddlAño.SelectedValue.ToString()), Convert.ToInt32(ddlMes.SelectedValue.ToString()));
                    DateTime pri       = Convert.ToDateTime(ddlAño.SelectedValue.ToString() + "-" + ddlMes.SelectedValue.ToString() + "-01 00:00:00");                           //AM;
                    DateTime seg       = Convert.ToDateTime(ddlAño.SelectedValue.ToString() + "-" + ddlMes.SelectedValue.ToString() + "-" + ultimodia.ToString() + " 00:00:00"); //AMD

                    RadGrid1.DataSource = pm.HistorialPorDia(ddlMaquina.SelectedValue.ToString(), pri, seg, 0);
                    RadGrid1.DataBind();

                    divModificar.Visible = false;
                }
                else
                {
                    string popupScript = "<script language='JavaScript'> alert('Debe seleccionar maquina, mes y año');  </script>";
                    Page.RegisterStartupScript("PopupScript", popupScript);
                }
            }
            catch (Exception ex)
            {
                string popupScript = "<script language='JavaScript'> alert('Ha ocurrido un error al buscar'\\n Error: " + ex.Message + ");  </script>";
                Page.RegisterStartupScript("PopupScript", popupScript);
            }
        }
        protected void btnFiltro_Click1(object sender, EventArgs e)
        {
            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 + " 23:59:59";

                RadGrid1.DataSource = controldes.ListarDespacho_informePorOTAgrupada("", "", fechaInicio, fechaTermino, 2);
                RadGrid1.DataBind();
            }
            else
            {
                CargarGrillaFecha_Filtro();
            }
        }
Exemplo n.º 17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DateTime f = Convert.ToDateTime("1900-01-01");
                ddlSeccion.DataSource     = par.Listar_Maquinas_TODAS("", "", "", f, f, 5);
                ddlSeccion.DataTextField  = "NOMBRE_SECCION";
                ddlSeccion.DataValueField = "ID_SECCION";
                ddlSeccion.DataBind();


                ddlSeccion.Items.Insert(0, new ListItem("Seleccione..."));

                ddlMaquina.DataSource     = par.Listar_Maquinas_Planas("", "", "", f, f, 0);
                ddlMaquina.DataTextField  = "Maquina";
                ddlMaquina.DataValueField = "ID_Maquina";
                ddlMaquina.DataBind();

                ddlMaquina.Items.Insert(0, new ListItem("Seleccione..."));


                ddlOperacion.DataSource     = par.Listar_Operaciones("", "", "", f, f, 1);
                ddlOperacion.DataTextField  = "Maquina";
                ddlOperacion.DataValueField = "ID_Maquina";
                ddlOperacion.DataBind();
                ddlOperacion.Items.Insert(0, new ListItem("Seleccione..."));



                RadGrid1.DataSource = "";
                RadGrid1.DataBind();
            }
        }
    private void BindVoteResultByClubwise(int districtNo, string years)
    {
        DataTable dt  = new DataTable();
        VoteBll   obj = new VoteBll();

        obj.DistrictNo = districtNo;
        obj.Years      = years;

        dt = obj.GetVoteResultByClubwise();
        if (dt.Rows.Count > 0)
        {
            Session["AllClubs"] = districtNo;
            lblMsg.Visible      = false;
            rbtnSort.Visible    = true;
            RadGrid1.Visible    = true;
            RadGrid1.DataSource = dt;
            RadGrid1.DataBind();
        }
        else
        {
            lblMsg.Visible   = true;
            rbtnSort.Visible = false;
            RadGrid1.Visible = false;
        }
    }
Exemplo n.º 19
0
    private void loadDataUser()
    {
        DataTable dtData = objuser.get_Users();

        RadGrid1.DataSource = dtData;
        RadGrid1.DataBind();
    }
Exemplo n.º 20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        DataAccessServiceClient client = new DataAccessServiceClient();

        RadGrid1.DataSource = client.GetEmployeeData(9).Employees;
        RadGrid1.DataBind();
    }
        public void cargardatos(string FechaRangoMin, string FechaRangoMax, Bobina bobina)
        {
            Bobina_Controller controlbob = new Bobina_Controller();

            RadGrid1.DataSource = controlbob.Listar_Informe_fallaCorte(bobina, FechaRangoMin, FechaRangoMax);
            RadGrid1.DataBind();
        }
    protected void lnk_Add_Command(object sender, CommandEventArgs e)
    {
        try
        {
            clearControls();
            radFinPeriod.Items.Clear();
            radFinPeriod.ClearSelection();
            radFinPeriod.Text = string.Empty;
            rad_TypeOfLoan.Items.Clear();
            rad_TypeOfLoan.ClearSelection();
            rad_TypeOfLoan.Text = string.Empty;
            BindLoanTypes();
            RadGrid1.DataSource = null;
            RadGrid1.DataBind();
            RadGrid1.Visible = false;

            rad_TypeOfLoan.Enabled   = true;
            btn_Save.Visible         = true;
            trExpend.Visible         = true;
            Rm_CY_page.SelectedIndex = 1;
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_MaxLoanEligibility", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
        protected void btnFiltro_Click1(object sender, EventArgs e)
        {
            if (txtFechaInicio.Text == "" && txtFechaTermino.Text == "")
            {
                CargarDatos();
            }
            else
            {
                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;
                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;

                if (fechaInicio == fechaTermino)
                {
                    fechaInicio  = fechaInicio + " 00:00:00";
                    fechaTermino = fechaTermino + " 23:59:59";
                }

                RadGrid1.DataSource = controlDes.sp_ListarFuturos_Mostrar(txtNumeroOT.Text, txtNombreOT.Text, txtCliente.Text, fechaInicio, fechaTermino, 1);
                RadGrid1.DataBind();
            }
        }
    private void BindLoanGrid()
    {
        try
        {
            RadGrid1.Visible = true;
            SMHR_LOANELIGIBLEAMOUNT smhr_LoanAmount = new SMHR_LOANELIGIBLEAMOUNT();
            smhr_LoanAmount.OPERATION         = operation.Get;
            smhr_LoanAmount.OrgID             = Convert.ToInt32(Session["ORG_ID"]);
            smhr_LoanAmount.LoanID            = Convert.ToInt32(rad_TypeOfLoan.SelectedValue);
            smhr_LoanAmount.FinancialPeriodID = Convert.ToInt32(radFinPeriod.SelectedValue);
            DataTable   dt           = BLL.get_LoanMaxEligibleAmount(smhr_LoanAmount);
            SMHR_PERIOD osmhr_period = new SMHR_PERIOD();
            osmhr_period.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
            osmhr_period.PERIOD_ID       = Convert.ToInt32(radFinPeriod.SelectedValue);
            DataTable dtCurrentFinPeriod = BLL.IscurrentFinPeriod(osmhr_period);

            if (string.Compare(dtCurrentFinPeriod.Rows[0]["ISEXISTS"].ToString(), "0", true) == 0)
            {
                RadGrid1.Enabled = false;
                btn_Save.Visible = false;
            }
            else
            {
                RadGrid1.Enabled = true;
                btn_Save.Visible = true;
            }
            RadGrid1.DataSource = dt;
            RadGrid1.DataBind();
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_MaxLoanEligibility", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            string codigo = Request.QueryString["Cod"];

            lblPallet.Text = codigo;

            // lblUsuario.Text = Session["Usuario"].ToString();

            lblUsuario.Text = cPT.ValidadoPor(codigo);


            lblFechaCreacion.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm");

            RadGrid1.DataSource = cPT.BuscaPalletDespachoImpresion(codigo);
            RadGrid1.DataBind();


            LabelKit.BarcodeGenerator code = new LabelKit.BarcodeGenerator();

            System.Drawing.Graphics g   = Graphics.FromImage(new Bitmap(1, 1));
            System.Drawing.Bitmap   bmp = new System.Drawing.Bitmap(1, 1, PixelFormat.Format32bppArgb);

            g = Graphics.FromImage(bmp);

            code.DrawCode128(g, codigo, 0, 0).Save(Server.MapPath("./barcodes/bc.png"), ImageFormat.Png);
            imgCodigo.ImageUrl = "./barcodes/bc.png";
            lblCodigo.Text     = codigo;
        }
Exemplo n.º 26
0
        protected void btnFiltro_Click1(object sender, EventArgs e)
        {
            string Estado = ((ddlEstado.SelectedValue.ToString() == "0") ? "" : ddlEstado.SelectedValue.ToString());

            try
            {
                if (txtFechaInicio.Text != "" && txtFechaTermino.Text != "")
                {
                    string[] str  = txtFechaInicio.Text.Split('/');
                    DateTime fIni = Convert.ToDateTime(str[1] + "/" + str[0] + "/" + str[2] + " 00:00:00");
                    string[] str2 = txtFechaTermino.Text.Split('/');
                    DateTime fTer = Convert.ToDateTime(str2[1] + "/" + str2[0] + "/" + str2[2] + " 23:59:59");

                    RadGrid1.DataSource = eot.Listado_EstadoOT(txtNumeroOT.Text, txtNombreOT.Text, txtCliente.Text, fIni, fTer, Estado, 1);
                    RadGrid1.DataBind();
                }
                else
                {
                    RadGrid1.DataSource = eot.Listado_EstadoOT(txtNumeroOT.Text, txtNombreOT.Text, txtCliente.Text, DateTime.Now, DateTime.Now, Estado, 0);
                    RadGrid1.DataBind();
                }
            }
            catch (Exception ex)
            {
                string popupScript = "<script language='JavaScript'> alert(" + ex.Message + "); </script>";
                Page.RegisterStartupScript("PopupScript", popupScript);
            }
        }
Exemplo n.º 27
0
 protected void btnFiltro_Click1(object sender, EventArgs e)
 {
     if (txtNumeroOT.Text != "")
     {
         try
         {
             if (ddlEstado.SelectedValue.ToString() == "Todos")
             {
                 RadGrid1.DataSource = o.ListaPreGuiasDespacho(txtNumeroOT.Text, 1, 0);
                 RadGrid1.DataBind();
             }
             else
             {
                 RadGrid1.DataSource = o.ListaPreGuiasDespacho(txtNumeroOT.Text, Convert.ToInt32(ddlEstado.SelectedValue.ToString()), 1);
                 RadGrid1.DataBind();
             }
         }
         catch
         {
             string popupScript = "<script language='JavaScript'> alert('ha Ocurrido un error vuelva a intentarlo');</script>";
             Page.RegisterStartupScript("PopupScript", popupScript);
         }
     }
     else
     {
         string popupScript = "<script language='JavaScript'> alert('Debe ingresar una OT para realizar la busqueda');</script>";
         Page.RegisterStartupScript("PopupScript", popupScript);
     }
 }
        protected void btnBuscarPallet_Click(object sender, EventArgs e)
        {
            btnImprimir.Visible = false;

            List <Prod_Terminados> lisPT = new List <Prod_Terminados>();

            lisPT = cPT.BuscaPallet(txtCodigo.Text);
            RadGrid1.DataSource = cPT.BuscaPallet(txtCodigo.Text);
            RadGrid1.DataBind();

            if (lisPT.Count != 0)
            {
                pnlError.Visible   = false;
                DivMensaje.Visible = false;
                lblCodigoGrid.Text = txtCodigo.Text;
            }
            else
            {
                DivMensaje.Visible = false;
                pnlError.Visible   = true;
                //poner error qe no existe o fue cerrada
                DivError.Visible   = true;
                imgError.ImageUrl  = "../../Images/cross.png";
                lblError.Text      = "El Pallet no ha sido encontrado o ya ha sido Cerrado.";
                lblError.ForeColor = Color.White;
                DivError.Attributes.Add("style", "background-color:Red");
            }
        }
Exemplo n.º 29
0
    private void ManageGrid()
    {
        try
        {
            if (Session["searchField"] != null)
            {
                SearchGrid(Session["searchField"].ToString(), Session["value"].ToString());
                RadGrid1.CurrentPageIndex = Convert.ToInt16(Request.Cookies["currentpage"]["pageIndex"].ToString());
                Request.Cookies["currentpage"].Expires = DateTime.Now.AddDays(-1);
            }

            else if (Session["name"] != null)
            {
                SearchByAlphabet(Session["name"].ToString());
                RadGrid1.CurrentPageIndex = Convert.ToInt16(Request.Cookies["currentpage"]["pageIndex"].ToString());
                Request.Cookies["currentpage"].Expires = DateTime.Now.AddDays(-1);
            }
            else
            {
                RadGrid1.CurrentPageIndex = Convert.ToInt16(Request.Cookies["currentpage"]["pageIndex"].ToString());
                Request.Cookies["currentpage"].Expires = DateTime.Now.AddDays(-1);
                RadGrid1.DataBind();
            }
        }
        catch { }
    }
Exemplo n.º 30
0
        protected void Timer_ontick(object sender, EventArgs e)
        {
            var dt = _entities.GetAllCV();

            RadGrid1.DataSource = dt;
            RadGrid1.DataBind();
        }