public int listaRegistrosPendConfItem_Param(ref Ent_tticol125 ParametrosIn, ref string strError) { method = MethodBase.GetCurrentMethod(); int retorno = 0; paramList = new Dictionary <string, object>(); //paramList.Add("p1", ParametrosIn.item.Trim().ToUpperInvariant()); paramList.Add("p1", ParametrosIn.pdno.Trim().ToUpperInvariant()); paramList.Add("p2", ParametrosIn.pono.ToString().Trim().ToUpperInvariant()); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList); try { consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia, ref parametersOut, null, true); retorno = Convert.ToInt32(consulta.Rows[0]["CANT"].ToString()); if (retorno > 0) { strError = "ReturnPending to Confirm"; } return(retorno); } catch (Exception ex) { strError = ex.InnerException.ToString(); log.escribirError(strError + Console.Out.NewLine + ex.Message, method.Module.Name, method.Name, method.ReflectedType.Name); } return(retorno); }
public bool updataPalletStatus(ref Ent_tticol125 ParametrosIn, ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add("p1", ParametrosIn.paid.Trim().ToUpperInvariant()); paramList.Add("p2", 3); // , whcol131 -Delieverd status=9 paramList.Add("p3", 7); // , ticol022, ticol042 -Delieverd status=11 //string paid = ParametrosIn.paid.Trim().ToUpperInvariant(); //int paidStatus = ParametrosIn.conf; strSentencia1 = recursos.readStatement(method.ReflectedType.Name, "updataPalletStatus022", ref owner, ref env, tabla, paramList); strSentencia2 = recursos.readStatement(method.ReflectedType.Name, "updataPalletStatus042", ref owner, ref env, tabla, paramList); strSentencia3 = recursos.readStatement(method.ReflectedType.Name, "updataPalletStatus131", ref owner, ref env, tabla, paramList); try { consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia1, ref parametersOut, null, true); consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia2, ref parametersOut, null, true); consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia3, ref parametersOut, null, true); // strError = "Status updated successfully"; return(true); } catch (Exception ex) { strError = "Error when querying data [tticol125]. Try again or contact your administrator"; log.escribirError(strError + Console.Out.NewLine + ex.Message, stackTrace.GetFrame(1).GetMethod().Name, method.Name, method.ReflectedType.Name); return(false); } }
public DataTable listaRegistrosLoteItem_Param(ref Ent_tticol125 ParametrosIn, ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add("p1", ParametrosIn.item.Trim().ToUpperInvariant()); paramList.Add("p2", ParametrosIn.clot.Trim().ToUpperInvariant()); paramList.Add("p3", ParametrosIn.pdno.Trim().ToUpperInvariant()); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList); try { consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia, ref parametersOut, null, true); if (consulta.Rows.Count < 1) { strError = "Lot Code doesn´t exist for this item, please check"; } else { strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList, 1); consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia, ref parametersOut, null, true); if (consulta.Rows.Count < 1) { strError = "Lot Code was not on Work Order. Cannot Continue"; } } return(consulta); } catch (Exception ex) { strError = ex.InnerException.ToString(); log.escribirError(strError + Console.Out.NewLine + ex.Message, method.Module.Name, method.Name, method.ReflectedType.Name); } return(consulta); }
public DataTable invGetPalletInfo(ref Ent_tticol125 ParametrosIn, ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add("p1", ParametrosIn.paid.Trim().ToUpperInvariant()); string paid = ParametrosIn.paid.Trim().ToUpperInvariant(); decimal quantity = ParametrosIn.reqt; decimal actualQuantity = 0; decimal status; string tableName = string.Empty; strSentencia = recursos.readStatement(method.ReflectedType.Name, "vallidatePalletInfo", ref owner, ref env, tabla, paramList); try { consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia, ref parametersOut, null, true); return(consulta); } catch (Exception ex) { strError = "Error when querying data [tticol125]. Try again or contact your administrator"; log.escribirError(strError + Console.Out.NewLine + ex.Message, stackTrace.GetFrame(1).GetMethod().Name, method.Name, method.ReflectedType.Name); } return(consulta); }
public DataTable listaRegistrosporConfirmar_Param(ref Ent_tticol125 ParametrosIn, ref string strError, bool print = false) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add("p1", ParametrosIn.pdno.Trim().ToUpperInvariant()); paramList.Add("p2", ParametrosIn.conf); paramList.Add("p3", ParametrosIn.paid.Trim().ToUpperInvariant()); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList); try { consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia, ref parametersOut, null, true); if (consulta.Rows.Count < 1) { strError = "Not found records for confirm"; } } catch (Exception ex) { strError = "Error when querying data [tticol125]. Try again or contact your administrator"; log.escribirError(strError + Console.Out.NewLine + ex.Message, stackTrace.GetFrame(1).GetMethod().Name, method.Name, method.ReflectedType.Name); } return(consulta); }
public double cantidadMaximaPorLote(ref Ent_tticol125 ParametrosIn, ref string strError) { method = MethodBase.GetCurrentMethod(); double retorno = 0.0; paramList = new Dictionary <string, object>(); paramList.Add("p1", ParametrosIn.pdno.Trim().ToUpperInvariant()); paramList.Add("p2", ParametrosIn.pono.ToString().Trim().ToUpperInvariant()); paramList.Add("p3", ParametrosIn.item.Trim().ToUpperInvariant()); paramList.Add("p4", ParametrosIn.clot.Trim().ToUpperInvariant()); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList); try { consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia, ref parametersOut, null, true); retorno = Convert.ToDouble(consulta.Rows[0]["CANTMAX"].ToString() == "" ? "0" : consulta.Rows[0]["CANTMAX"].ToString()); //retorno = Convert.ToInt32(consulta.Rows[0]["cantMax"]); if (retorno < 1) { strError = "No returns for this lot"; } return(retorno); } catch (Exception ex) { strError = ex.InnerException.ToString(); log.escribirError(strError + Console.Out.NewLine + ex.Message, method.Module.Name, method.Name, method.ReflectedType.Name); } return(retorno); }
public static string VerificarLote(string ITEM, string CLOT) { string strError = string.Empty; Ent_tticol125 Obj_tticol125 = new Ent_tticol125(); Obj_tticol125.item = ITEM; Obj_tticol125.clot = CLOT; DataTable DtTticol125 = ITticol125.listaRegistrosLoteItem_Param(ref Obj_tticol125); if (DtTticol125.Rows.Count > 0) { Obj_tticol125.Error = false; Obj_tticol125.TypeMsgJs = "console"; Obj_tticol125.SuccessMsg = "Lote Encontrado"; } else { Obj_tticol125.Error = true; Obj_tticol125.TypeMsgJs = "label"; Obj_tticol125.ErrorMsg = Lotcodedoesntexist; } return(JsonConvert.SerializeObject(Obj_tticol125)); }
public static string vallidatePalletID(string palletID, string quantity) { //TextBox palletIdTextBox = (TextBox)e.Row.Cells[10].FindControl("palletId"); // //quantityToReturn = "2"; InterfazDAL_tticol125 idal = new InterfazDAL_tticol125(); Ent_tticol125 obj = new Ent_tticol125(); string strError = string.Empty; string retorno = string.Empty; //TextBox quantity = (TextBox)e.Row.Cells[10].FindControl("palletId"); obj.paid = palletID.Trim().ToUpperInvariant(); //obj.reqt = Convert.ToInt32(fila.GetValue(8).ToString().Trim()); obj.reqt = Convert.ToDecimal(quantity); DataTable resultado = idal.vallidatePalletID(ref obj, ref strError); decimal palletQuantity = 0; decimal status; string tableName = string.Empty; decimal givenQuantity = Convert.ToDecimal(quantity); if (resultado.Rows.Count < 1) { return(PalletIDdoesntexists); } else { foreach (DataRow dr in resultado.Rows) { status = Convert.ToDecimal(dr.ItemArray[8].ToString()); palletQuantity = Convert.ToDecimal(dr.ItemArray[3].ToString()); tableName = dr.ItemArray[0].ToString(); if (palletQuantity < givenQuantity) { retorno = QuantitytoreturnmustbeequalorlessthanPalletIDquantityforpalletId + " " + palletID.Trim().ToUpperInvariant(); break; } if (((tableName == "whcol131") || (tableName == "whcol130")) && (status != 9)) { retorno = PalletIDstatusdoesntallowreturn ; break; } else if (((tableName == "ticol022") || (tableName == "ticol042")) && (status != 11)) { retorno = PalletIDstatusdoesntallowreturn; break; } } } return(retorno); }
public static string validarCantidades(object fila, string valor, string lote, string qty) { InterfazDAL_tticol125 idal = new InterfazDAL_tticol125(); Ent_tticol125 obj = new Ent_tticol125(); string strError = string.Empty; string retorno = string.Empty; Factor MyConvertionFactor = new Factor { }; Array row = fila.ToString().Replace(" ", "").Replace("\"", "").Split(','); try { valor = valor.Trim(); lote = lote.Trim().ToUpperInvariant(); if (!string.IsNullOrEmpty(valor)) { if (row.GetValue(10).ToString().Trim() == "1") { MyConvertionFactor = FactorConversion(row.GetValue(4).ToString().Trim(), row.GetValue(6).ToString().Trim(), "plt"); decimal QUANTITYCUNI = (MyConvertionFactor.Tipo == "Div") ? Convert.ToDecimal((Convert.ToDecimal(qty) * MyConvertionFactor.FactorB) / MyConvertionFactor.FactorD) : Convert.ToDecimal((Convert.ToDecimal(qty) * MyConvertionFactor.FactorD) / MyConvertionFactor.FactorB); if (QUANTITYCUNI > 1) { strError = Returnedquantityhigherthanpalletsize; return(strError); } } } if (!string.IsNullOrEmpty(valor) && !string.IsNullOrEmpty(lote)) { double iCantMax = 0; obj.pdno = row.GetValue(1).ToString().Trim(); obj.pono = Convert.ToInt32(row.GetValue(2).ToString().Trim()); obj.item = row.GetValue(4).ToString().Trim(); obj.clot = lote.ToString().Trim(); iCantMax = idal.cantidadMaximaPorLote(ref obj, ref strError); if (double.Parse(valor) <= iCantMax) { return(retorno); } else if (string.IsNullOrEmpty(strError)) { strError = Theamounttoreturnisinvalid; } } } catch (Exception ex) { strError = ex.InnerException != null ? ex.Message + " (" + ex.InnerException + ")" : ex.Message; } return(strError); }
public static string VerificarPallet(string PAID) { HttpContext.Current.Session["TABLA"] = ""; HttpContext.Current.Session["PAID"] = ""; HttpContext.Current.Session["CLOT"] = ""; HttpContext.Current.Session["CWAR"] = ""; HttpContext.Current.Session["LOCA"] = ""; HttpContext.Current.Session["QTYA"] = ""; HttpContext.Current.Session["RFID"] = ""; string strError = string.Empty; Ent_tticol125 Obj_tticol125 = new Ent_tticol125(); Obj_tticol125.paid = PAID; DataTable DtTticol125 = ITticol137.vallidatePalletInfoSalesOrder(ref Obj_tticol125, ref strError); if (DtTticol125.Rows.Count > 0) { Obj_tticol125.Error = false; Obj_tticol125.TypeMsgJs = "console"; Obj_tticol125.SuccessMsg = "Lote Encontrado"; Obj_tticol125.item = DtTticol125.Rows[0]["T$ITEM"].ToString(); Obj_tticol125.clot = DtTticol125.Rows[0]["T$CLOT"].ToString(); Obj_tticol125.cwar = DtTticol125.Rows[0]["T$CWAR"].ToString(); Obj_tticol125.dsca = DtTticol125.Rows[0]["DSCA"].ToString(); Obj_tticol125.pdno = DtTticol125.Rows[0]["T$LOCA"].ToString(); Obj_tticol125.qtya = DtTticol125.Rows[0]["T$QTYC"].ToString(); Obj_tticol125.stat = DtTticol125.Rows[0]["STAT"].ToString(); Obj_tticol125.kltc = DtTticol125.Rows[0]["KLTC"].ToString(); Obj_tticol125.rfid = DtTticol125.Rows[0]["PAIDR"].ToString(); HttpContext.Current.Session["TABLA"] = DtTticol125.Rows[0]["TBL"].ToString(); HttpContext.Current.Session["PAID"] = PAID; HttpContext.Current.Session["CLOT"] = Obj_tticol125.clot; HttpContext.Current.Session["CWAR"] = Obj_tticol125.cwar; HttpContext.Current.Session["LOCA"] = Obj_tticol125.pdno; HttpContext.Current.Session["QTYA"] = Obj_tticol125.qtya; HttpContext.Current.Session["STAT"] = Obj_tticol125.stat; HttpContext.Current.Session["RFID"] = Obj_tticol125.rfid; HttpContext.Current.Session["User"].ToString(); Obj_tticol125.statsTab = LstStatusTab.FindAll(e => DtTticol125.Rows[0]["TBL"].ToString().Contains(e.Table)); //JC 121021 Generar la tabla de estados de acuerdo a la tabla } else { Obj_tticol125.Error = true; Obj_tticol125.TypeMsgJs = "label"; Obj_tticol125.ErrorMsg = Paidcodedoesntexist; } return(JsonConvert.SerializeObject(Obj_tticol125)); }
public DataTable ConsultarQtdl(ref Ent_tticol125 obj, ref string strError) { try { DataTable retorno = dal.ConsultarQtdl(obj, strError); return(retorno); } catch (Exception ex) { throw new Exception(ex.InnerException.ToString()); } }
protected void btnSave_Click(object sender, EventArgs e) { List <Ent_tticol125> parameterCollection = new List <Ent_tticol125>(); Ent_tticol125 obj = new Ent_tticol125(); foreach (GridViewRow fila in grdRecords.Rows) { DropDownList lista = ((DropDownList)fila.Cells[7].Controls[1]); if (lista != null) { if (Convert.ToInt32(lista.SelectedValue) == 1) { obj = new Ent_tticol125(); obj.pdno = txtWorkOrder.Text.Trim(); obj.pono = Convert.ToInt32(fila.Cells[0].Text); obj.item = fila.Cells[1].Text; obj.cwar = fila.Cells[3].Text.Trim(); obj.clot = string.IsNullOrEmpty(fila.Cells[4].Text) ? " " : fila.Cells[4].Text; obj.reqt = Convert.ToDecimal(fila.Cells[5].Text); obj.refcntd = "0"; obj.refcntu = "0"; obj.mess = " "; obj.prin = Convert.ToInt32(((Label)fila.Cells[8].FindControl("prin")).Text); obj.conf = Convert.ToInt32(lista.SelectedValue);; obj.idrecord = grdRecords.DataKeys[fila.RowIndex].Value.ToString(); //Requerimiento No. 46122. //Insertar en la tabla ticol080 //CChaverra 28/07/2017 obj.user = Session["user"].ToString(); parameterCollection.Add(obj); } } } InterfazDAL_tticol125 idal = new InterfazDAL_tticol125(); idal.actualizarRegistro_Param(ref parameterCollection, ref strError, Aplicacion); printResult.Visible = true; lblResult.Text = "Records was saved succesfully."; this.HeaderGrid.Visible = false; grdRecords.DataSource = ""; grdRecords.DataBind(); if (strError != string.Empty) { lblResult.Text = strError; Label control = ((Label)Page.Controls[0].FindControl("lblPageTitle")); control.Text = strError; return; //throw new System.InvalidOperationException(strError); } }
public DataTable vallidatePalletInfoSalesOrder(ref Ent_tticol125 parametros, ref string strError) { DataTable retorno; try { retorno = dal.vallidatePalletInfoSalesOrder(ref parametros, ref strError); return(retorno); } catch (Exception ex) { throw new Exception(ex.InnerException.ToString()); } }
public bool updataPalletStatus(ref Ent_tticol125 parametros, ref string strError) { bool retorno; try { retorno = dal.updataPalletStatus(ref parametros, ref strError); return(true); } catch (Exception ex) { throw new Exception(ex.InnerException.ToString()); } }
public int listaRegistrosPendConfItem_Param(ref Ent_tticol125 parametros, ref string strError) { int retorno = 0; try { retorno = dal.listaRegistrosPendConfItem_Param(ref parametros, ref strError); return(retorno); } catch (Exception ex) { throw new Exception(ex.InnerException.ToString()); } }
protected void grdRecords_RowDataBound(object sender, GridViewRowEventArgs e) { InterfazDAL_tticol125 idal = new InterfazDAL_tticol125(); Ent_tticol125 obj = new Ent_tticol125(); string strError = string.Empty; if (e.Row.RowType == DataControlRowType.DataRow) { //string prin = ((DataRowView)e.Row.DataItem).DataView.Table.Rows[e.Row.RowIndex]["T$PRIN"].ToString(); string paid = ((DataRowView)e.Row.DataItem).DataView.Table.Rows[e.Row.RowIndex]["T$PAID"].ToString(); //JC 190821 Actualiza el contador de impresiones cada vez que ingresen if (IsPostBack) { idal.updateFieldPrint(ref paid, ref strError); if (strError != string.Empty) { OrderError.IsValid = false; } } var printed = idal.queryFieldPrint(ref paid, ref strError); string prin = printed.Rows[0]["T$PRIN"].ToString().Trim(); valueprint = prin; //obj.prin = idal.Rows[0].["T$PRIN"] // ((Button)e.Row.Cells[7].FindControl("btnPrint")).OnClientClick = "printTag(" + FilaSerializada.Trim() + ")"; //((Button)e.Row.Cells[7].FindControl("btnPrint")).Text = (prin.Trim().Equals("1") // ? _idioma == "INGLES" ? "Print" : "Imprimir" : _idioma == "INGLES" ? "Reprint" : "Reimprimir"); //Cambia el estado del campo print en la tabla ticol125 //JC 190821 Actualiza el contador de impresiones cada vez que ingresen //if (prin.Trim().Equals("2")) //{ //idal.updateFieldPrint(ref paid, ref strError); //if (strError != string.Empty) //{ // OrderError.IsValid = false; //} //} //JC 190821 Actualiza el contador de impresiones cada vez que ingresen if (Convert.ToInt16(valueprint) > 1) { ((Button)e.Row.Cells[7].FindControl("btnPrint")).Text = (_idioma == "INGLES" ? "Reprint" : "Reimprimir"); } else { ((Button)e.Row.Cells[7].FindControl("btnPrint")).Text = (_idioma == "INGLES" ? "Print" : "Imprimir"); } } }
public double cantidadMaximaPorLote(ref Ent_tticol125 parametros, ref string strError) { double retorno = 0.0; try { retorno = dal.cantidadMaximaPorLote(ref parametros, ref strError); return(retorno); } catch (Exception ex) { throw new Exception(ex.InnerException.ToString()); } }
public DataTable listaRegistrosporConfirmar_Param(ref Ent_tticol125 parametros, ref string strError, bool print = false) { //int retorno = -1; DataTable retorno; try { retorno = dal.listaRegistrosporConfirmar_Param(ref parametros, ref strError, print); return(retorno); } catch (Exception ex) { throw new Exception(ex.InnerException.ToString()); } }
public DataTable listaRegistrosLoteItem_Param(ref Ent_tticol125 parametros) { //int retorno = -1; DataTable retorno; try { retorno = dal.listaRegistrosLoteItem_Param(ref parametros); return(retorno); } catch (Exception ex) { throw new Exception(ex.InnerException.ToString()); } }
public DataTable ConsultarRegistroPalletID(ref Ent_tticol125 parametros, ref string strError, bool print = false) { //int retorno = -1; DataTable retorno; try { retorno = dal.ConsultarRegistroPalletID(ref parametros, ref strError); return(retorno); } catch (Exception ex) { throw new Exception(ex.InnerException.ToString()); } }
public DataTable listaRegistrosOrden_ParamHis(ref Ent_tticol125 parametros, ref string strError) { //int retorno = -1; DataTable retorno; try { retorno = dal.listaRegistrosOrden_ParamHis(ref parametros, ref strError); return(retorno); } catch (Exception ex) { throw new Exception(ex.InnerException.ToString()); } }
public DataTable getCostCenter(ref Ent_tticol125 parametros, ref string strError) { //int retorno = -1; DataTable retorno; try { retorno = dal.getCostCenter(ref parametros, ref strError); return(retorno); } catch (Exception ex) { throw new Exception(ex.InnerException.ToString()); } }
private List <Ent_ParametrosDAL> AdicionaParametrosComunes(Ent_tticol125 parametros, bool blnUsarPRetorno = false) { method = MethodBase.GetCurrentMethod(); string strError = string.Empty; List <Ent_ParametrosDAL> parameterCollection = new List <Ent_ParametrosDAL>(); try { Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$PDNO", DbType.String, parametros.pdno); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$PONO", DbType.Int32, parametros.pono); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$ITEM", DbType.String, " " + parametros.item.Trim()); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$CWAR", DbType.String, parametros.cwar); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$CLOT", DbType.String, parametros.clot); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$REQT", DbType.Decimal, Convert.ToDecimal(parametros.reqt).ToString("#.##0,0000")); //DbType.Int32, parametros.reqt); if (!string.IsNullOrEmpty(parametros.user)) { Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$USER", DbType.String, parametros.user); } if (parametros.prin > 0) { Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$PRIN", DbType.Int32, parametros.prin); } Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$CONF", DbType.Int32, parametros.conf); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$REFCNTD", DbType.String, parametros.refcntd); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$REFCNTU", DbType.String, parametros.refcntu); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$MESS", DbType.String, parametros.mess); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$PAID", DbType.String, parametros.paid); //if (!string.IsNullOrEmpty(parametros.idrecord)) // Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":ROWID", DbType.String, parametros.idrecord); if (blnUsarPRetorno) { Ent_ParametrosDAL pDal = new Ent_ParametrosDAL(); pDal.Name = "@p_Int_Resultado"; pDal.Type = DbType.Int32; pDal.ParDirection = ParameterDirection.Output; parameterCollection.Add(pDal); } } catch (Exception ex) { strError = "Error when creating parameters [125]. Try again or contact your administrator \n"; log.escribirError(strError + Console.Out.NewLine + ex.Message, stackTrace.GetFrame(1).GetMethod().Name, method.Name, method.ReflectedType.Name); } return(parameterCollection); }
protected void btnSend_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtWorkOrder.Text.Trim())) { minlenght.Enabled = true; minlenght.ErrorMessage = "Work Order is required"; minlenght.IsValid = false; return; } InterfazDAL_tticol125 idal = new InterfazDAL_tticol125(); Ent_tticol125 obj = new Ent_tticol125(); string strError = string.Empty; txtWorkOrder.Text = txtWorkOrder.Text.ToUpperInvariant(); obj.pdno = txtWorkOrder.Text.ToUpperInvariant(); resultado = idal.listaRegistrosOrden_Param(ref obj, ref strError, true); //DataTable resultado = TABLA; // string findIn = string.Empty; // Validar si el numero de orden trae registros if (strError != string.Empty || resultado.Rows.Count < 1) { strError = string.Empty; // Si no encuentra registros en la principal busca en historico resultado = idal.listaRegistrosOrden_ParamHis(ref obj, ref strError); if (strError != string.Empty || resultado.Rows.Count < 1) { OrderError.IsValid = false; txtWorkOrder.Focus(); grdRecords.DataSource = ""; grdRecords.DataBind(); return; } findIn = " [ Find in History ]"; Session["update"] = 1; } lblOrder.Text = "Order: " + obj.pdno + findIn; grdRecords.DataSource = resultado; grdRecords.DataBind(); if (Session["resultado"] == null) { Session["resultado"] = resultado; } }
public static string VerificarPallet(string PAID) { HttpContext.Current.Session["TABLA"] = ""; HttpContext.Current.Session["PAID"] = ""; HttpContext.Current.Session["CLOT"] = ""; HttpContext.Current.Session["CWAR"] = ""; HttpContext.Current.Session["LOCA"] = ""; HttpContext.Current.Session["QTYA"] = ""; string strError = string.Empty; Ent_tticol125 Obj_tticol125 = new Ent_tticol125(); Obj_tticol125.paid = PAID; DataTable DtTticol125 = ITticol137.vallidatePalletInfoSalesOrder(ref Obj_tticol125, ref strError); if (DtTticol125.Rows.Count > 0) { Obj_tticol125.Error = false; Obj_tticol125.TypeMsgJs = "console"; Obj_tticol125.SuccessMsg = "Lote Encontrado"; Obj_tticol125.item = DtTticol125.Rows[0]["T$ITEM"].ToString(); Obj_tticol125.clot = DtTticol125.Rows[0]["T$CLOT"].ToString(); Obj_tticol125.cwar = DtTticol125.Rows[0]["T$CWAR"].ToString(); Obj_tticol125.dsca = DtTticol125.Rows[0]["DSCA"].ToString(); Obj_tticol125.pdno = DtTticol125.Rows[0]["T$LOCA"].ToString(); Obj_tticol125.qtya = DtTticol125.Rows[0]["T$QTYC"].ToString(); HttpContext.Current.Session["TABLA"] = DtTticol125.Rows[0]["TBL"].ToString(); HttpContext.Current.Session["PAID"] = PAID; HttpContext.Current.Session["CLOT"] = Obj_tticol125.clot; HttpContext.Current.Session["CWAR"] = Obj_tticol125.cwar; HttpContext.Current.Session["LOCA"] = Obj_tticol125.pdno; HttpContext.Current.Session["QTYA"] = Obj_tticol125.qtya; HttpContext.Current.Session["USER"].ToString(); } else { Obj_tticol125.Error = true; Obj_tticol125.TypeMsgJs = "label"; Obj_tticol125.ErrorMsg = Paidcodedoesntexist; } return(JsonConvert.SerializeObject(Obj_tticol125)); }
protected void btnSend_Click(object sender, EventArgs e) { //if (string.IsNullOrEmpty(txtPalletId.Text.Trim())) //{ // minlenght.Enabled = true; // minlenght.ErrorMessage = mensajes("Please Fill all the Required Fields."); // minlenght.IsValid = false; // return; //} InterfazDAL_tticol125 idal = new InterfazDAL_tticol125(); Ent_tticol125 obj = new Ent_tticol125(); string strError = string.Empty; //obj.pdno = txtWorkOrder.Text.ToUpper(); obj.conf = 2; // CONFIRMED = NO obj.paid = txtPalletId.Text.ToUpper(); lblResult.Text = string.Empty; DataTable resultado = idal.listaRegistrosporConfirmar_Param(ref obj, ref strError); // Validar si el numero de orden trae registros if (strError != string.Empty) { OrderError.IsValid = false; OrderError.ForeColor = System.Drawing.Color.Red; OrderError.ErrorMessage = strError; txtWorkOrder.Focus(); btnSave.Visible = false; return; } lblOrder.Text = _idioma == "INGLES" ? "Order: " : "Orden: " + obj.pdno; obj.pdno = resultado.Rows[0]["T$PDNO"].ToString().Trim(); Order = obj.pdno; grdRecords.DataSource = resultado; grdRecords.DataBind(); this.HeaderGrid.Visible = true; btnSave.Visible = true; lblResult.Text = ""; }
protected void btnSend_Click(object sender, EventArgs e) { btnSave.Visible = false; if (string.IsNullOrEmpty(txtWorkOrder.Text.Trim())) { RequiredField.Enabled = true; RequiredField.IsValid = false; txtWorkOrder.Focus(); grdRecords.DataSource = ""; grdRecords.DataBind(); return; } lblOrder.Visible = true; InterfazDAL_tticol125 idal = new InterfazDAL_tticol125(); Ent_tticol125 obj = new Ent_tticol125(); string strError = string.Empty; txtWorkOrder.Text = txtWorkOrder.Text.ToUpperInvariant(); obj.pdno = txtWorkOrder.Text.ToUpperInvariant(); lblResult.Text = string.Empty; DataTable resultado = idal.listaRegistrosOrden_Param(ref obj, ref strError); // Validar si el numero de orden trae registros if (strError != string.Empty) { OrderError.IsValid = false; txtWorkOrder.Focus(); btnSave.Visible = false; grdRecords.DataSource = ""; grdRecords.DataBind(); return; } lblOrder.Text = "Order: " + obj.pdno; grdRecords.DataSource = resultado; grdRecords.DataBind(); this.HeaderGrid.Visible = true; btnSave.Visible = true; lblResult.Text = ""; }
public static string validarCantidades(object fila, string valor, string lote) { InterfazDAL_tticol125 idal = new InterfazDAL_tticol125(); Ent_tticol125 obj = new Ent_tticol125(); string strError = string.Empty; string retorno = string.Empty; try { valor = valor.Trim(); lote = lote.Trim().ToUpperInvariant(); if (!string.IsNullOrEmpty(valor) && !string.IsNullOrEmpty(lote)) { Array row = fila.ToString().Replace(" ", "").Replace("\"", "").Split(','); double iCantMax = 0; obj.pdno = row.GetValue(1).ToString().Trim(); obj.pono = Convert.ToInt32(row.GetValue(2).ToString().Trim()); obj.item = row.GetValue(4).ToString().Trim(); obj.clot = lote.ToString().Trim(); iCantMax = idal.cantidadMaximaPorLote(ref obj, ref strError); if (double.Parse(valor) <= iCantMax) { return(retorno); } else if (string.IsNullOrEmpty(strError)) { strError = "The amount to return is invalid"; } } } catch (Exception ex) { strError = ex.InnerException != null ? ex.Message + " (" + ex.InnerException + ")" : ex.Message; } return(strError); }
public DataTable listaRegistrosLoteItem_Param(ref Ent_tticol125 ParametrosIn) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add("p1", ParametrosIn.item.Trim().ToUpperInvariant()); paramList.Add("p2", ParametrosIn.clot.Trim().ToUpperInvariant()); paramList.Add("p3", ParametrosIn.pdno.Trim().ToUpperInvariant()); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList); try { consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia, ref parametersOut, null, true); return(consulta); } catch (Exception ex) { //strError = ex.InnerException.ToString(); log.escribirError(Console.Out.NewLine + ex.Message, method.Module.Name, method.Name, method.ReflectedType.Name); } return(consulta); }
public DataTable ConsultarQtdl(Ent_tticol125 obj, string strError) { DataTable retorno = new DataTable(); method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add("T$PDNO", obj.pdno.Trim()); paramList.Add("T$PONO", obj.pono); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList); try { retorno = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia, ref parametersOut, null, true); } catch (Exception ex) { strError = "Error when querying data [ttico025]. Try again or contact your administrator"; log.escribirError(strError + Console.Out.NewLine + ex.Message, stackTrace.GetFrame(1).GetMethod().Name, method.Name, method.ReflectedType.Name); } return(retorno); }