public void Cargar_FechaEntrega(string OT) { DespachoController controldes = new DespachoController(); RadGrid4.DataSource = controldes.ListarProduccionOT_tablaTemporal_Detalle(OT); RadGrid4.DataBind(); }
public void Cargar_Despacho(string OT) { DespachoController controldes = new DespachoController(); RadGrid5.DataSource = controldes.ListarDespacho(OT); RadGrid5.DataBind(); }
public void Cargar_FechaEntrega(string OT) { DespachoController controldes = new DespachoController(); RadGrid4.DataSource = controldes.sp_ListarFuturos_Mostrar(OT, "", "", DateTime.Now.ToString("yyyy-MM-dd"), DateTime.Now.AddYears(+1).ToString("yyyy-MM-dd HH:mm:ss"), 0); RadGrid4.DataBind(); }
public List <Despacho> ListDespacho(string OT) { DespachoController dc = new DespachoController(); List <Despacho> lista = dc.ListarPDF(OT); return(lista); }
protected void btnFiltro_Click1(object sender, EventArgs e) { DespachoController controldes = new DespachoController(); string FechaInicio = ""; string FechaTermino = ""; if (txtFechaInicio.Text != "" && txtFechaTermino.Text != "") { string[] strn = txtFechaInicio.Text.Split('/'); FechaInicio = strn[2] + "-" + strn[1] + "-" + strn[0]; string[] strn1 = txtFechaTermino.Text.Split('/'); FechaTermino = strn1[2] + "-" + strn1[1] + "-" + strn1[0]; } RadGrid1.DataSource = controldes.ListarInformeOTxRegion(txtNumeroOT.Text, FechaInicio, FechaTermino); RadGrid1.DataBind(); ibExcel.Visible = true; }
public List <DespachoFuturosExcel> ListDespachoFuturos(string OT, string NombreOT, string Cliente, string FeInicio, string FeTermino) { DespachoController dc = new DespachoController(); List <DespachoFuturosExcel> lista = new List <DespachoFuturosExcel>(); DateTime FechaInicio; DateTime FechaTermino; if (FeInicio != "" && FeTermino != "") { string[] str = FeInicio.Split('/'); string dia = str[0]; string mes = str[1]; string año = str[2]; string[] str2 = FeTermino.Split('/'); string dia2 = str2[0]; string mes2 = str2[1]; string año2 = str2[2]; string f1 = mes + "/" + dia + "/" + año + " 00:00:00"; string f2 = mes2 + "/" + dia2 + "/" + año2 + " 23:59:59"; //if (f1 == f2) //{ // f1 = f1 + ; // f2 = f2 + " 23:59:59"; //} FechaInicio = Convert.ToDateTime(f1); FechaTermino = Convert.ToDateTime(f2); lista = dc.sp_ListarFuturos_Mostrar(OT, NombreOT, Cliente, f1, f2, 1);//ListarFuturos(OT,NombreOT,Cliente,FechaInicio, FechaTermino,2); } else { lista = dc.sp_ListarFuturos_Mostrar(OT, NombreOT, Cliente, null, null, 2); } //if(OT=="" && NombreOT =="" && Cliente=="" && FeInicio== "") //{ // lista = dc.sp_ListarFuturos_Mostrar(OT, NombreOT, Cliente, null, null, 1);//ListarFuturos(OT,NombreOT,Cliente,null,null,0); //} //if (OT != "" && NombreOT != "" && Cliente != "" && FeInicio == "") //{ // lista = dc.sp_ListarFuturos_Mostrar(OT, NombreOT, Cliente,null,null, 1);//ListarFuturos(OT,NombreOT,Cliente,null,null,1); //} return(lista); }
public List <DespachoPDF> ListDespacho(string OT, string NombreOT, string FI, string FT) { DespachoController dc = new DespachoController(); if (FI == "01/01/1900" || FT == "01/01/1900") { List <DespachoPDF> lista = dc.ListarDespacho_informePorOT_PDF(OT, NombreOT, "", Convert.ToDateTime(FI), Convert.ToDateTime(FT), 1); return(lista); } else { if (FI == FT) { FI = FI + " 00:00:00"; FT = FT + " 23:59:59"; } List <DespachoPDF> lista = dc.ListarDespacho_informePorOT_PDF(OT, NombreOT, "", Convert.ToDateTime(FI), Convert.ToDateTime(FT), 2); return(lista); } }
public List <DespachoPDF> ListDespacho(string OT, string NombreOT, string FI, string FT, string Check) { DespachoController dc = new DespachoController(); List <DespachoPDF> lista = new List <DespachoPDF>(); if (FI == "01/01/1900" || FT == "01/01/1900") { 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 = mes + "/" + dia + "/" + año + " 00:00:00"; //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 = mes2 + "/" + dia2 + "/" + año2 + " 23:59:59"; lista = dc.ListarDespacho_informeDiario_DetalladoPDF(OT, NombreOT, "", Convert.ToDateTime(fechaInicio), Convert.ToDateTime(fechaTermino), 2); return(lista); } else { if (FI == FT) { FI = FI + " 00:00:00"; FT = FT + " 23:59:59"; } lista = dc.ListarDespacho_informeDiario_DetalladoPDF(OT, NombreOT, "", Convert.ToDateTime(FI), Convert.ToDateTime(FT), 2); } return(lista); }
public List <DespachoKilos> ListDespachoKilos(string OT, string NombreOT, string Cliente, string Tranportista, string FeInicio, string FeTermino) { DespachoController dc = new DespachoController(); List <DespachoKilos> lista = new List <DespachoKilos>(); DateTime? FechaInicio = null; DateTime? FechaTermino = null; if (FeInicio != "" && FeTermino != "") { string[] str = FeInicio.Split('/'); string dia = str[0]; string mes = str[1]; string año = str[2]; //FechaInicio = Convert.ToDateTime(mes + dia + año); string F = mes + "/" + dia + "/" + año; string[] str2 = FeTermino.Split('/'); string dia2 = str[0]; string mes2 = str[1]; string año2 = str[2]; //FechaTermino = Convert.ToDateTime(mes2 + dia2 + año2); string F1 = mes2 + "/" + dia2 + "/" + año2; if (F == F1) { F = F + " 00:00:00"; F1 = F1 + " 23:59:59"; } FechaInicio = Convert.ToDateTime(F); FechaTermino = Convert.ToDateTime(F1); lista = dc.ListarDespacho_KilosExcel(OT, NombreOT, Cliente, Tranportista, FechaInicio, FechaTermino, 2); } else { lista = dc.ListarDespacho_KilosExcel(OT, NombreOT, Cliente, Tranportista, null, null, 1); } return(lista); }