public DataTable GetData(ref Ent_ttdcol524 ParametrosIn, ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add("p1", ParametrosIn.item.Trim().ToUpperInvariant()); paramList.Add("p2", ParametrosIn.adjustmentQuantity.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 [ttdcol524]. 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 int insertarRegistro(ref List <Ent_ttccol300> parametros, ref string strError) { method = MethodBase.GetCurrentMethod(); bool retorno = false; try { strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla); foreach (Ent_ttccol300 reg in parametros) { parametrosIn = AdicionaParametrosComunes(reg); retorno = DAL.BaseDAL.BaseDal.EjecutarCrud("text", strSentencia, ref parametersOut, parametrosIn, false); } return(Convert.ToInt32(retorno)); } catch (Exception ex) { //Comentado CChaverra 11052017 //strError = "Error when inserting data [ttccol300]. 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); strError = ex.InnerException != null ? ex.Message + " (" + ex.InnerException + ")" : ex.Message; } return(Convert.ToInt32(retorno)); }
public DataTable findByNumberReceipt(ref string numberReceipt, ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":T$RCNO", numberReceipt.Trim()); 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 = "Incorrect location, please verify."; } } catch (Exception ex) { strError = "Error to the search sequence [twhinh210]. 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(consulta); }
public bool updateLocation(ref string loca, ref string paid, ref string strError) { method = MethodBase.GetCurrentMethod(); bool retorno = false; try { paramList = new Dictionary <string, object>(); paramList.Add(":T$PAID", paid.Trim().ToUpper()); paramList.Add(":T$LOCA", loca.Trim().ToUpper()); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList); retorno = DAL.BaseDAL.BaseDal.EjecutarCrud("text", strSentencia, ref parametersOut, parametrosIn, false); return(retorno); } catch (Exception ex) { strError = ex.InnerException != null ? ex.Message + " (" + ex.InnerException + ")" : ex.Message; } return(retorno); }
public DataTable validarRegistroByPalletId(ref string palletId, ref string uniqueId, ref string bodegaori, ref string bodegades, ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":T$PAID", palletId.Trim()); paramList.Add(":T$UNID", uniqueId.Trim()); paramList.Add(":T$WHSO", bodegaori.Trim()); paramList.Add(":T$WHTA", bodegades.Trim()); 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 = "Incorrect location, please verify."; } } catch (Exception ex) { strError = "Error to the search sequence [twhcol125]. 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(consulta); }
public DataTable listaRegistros_ObtieneItem(ref Ent_twhinr140 ParametrosIn, ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":T$LOCA", ParametrosIn.loca.Trim().ToUpperInvariant()); paramList.Add(":T$CLOT", 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); if (consulta.Rows.Count < 1) { strError = "That Lot doesn't have Item Asociated."; } } catch (Exception ex) { strError = "Error when querying data [twhinr140]. Try again or contact your administrator \n " + strSentencia; log.escribirError(strError + Console.Out.NewLine + ex.Message, stackTrace.GetFrame(1).GetMethod().Name, method.Name, method.ReflectedType.Name); } return(consulta); }
public int insertarRegistro(ref List <Ent_twhcol015> parametros, ref string strError) { method = MethodBase.GetCurrentMethod(); bool retorno = false; try { strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla); foreach (Ent_twhcol015 reg in parametros) { parametrosIn = AdicionaParametrosComunes(reg); retorno = DAL.BaseDAL.BaseDal.EjecutarCrud("text", strSentencia, ref parametersOut, parametrosIn, false); } return(Convert.ToInt32(retorno)); } catch (Exception ex) { strError = "Error when inserting data [twhcol015]. Try again or contact your administrator"; log.escribirError(strError + Console.Out.NewLine + ex.Message, method.Module.Name, method.Name, method.ReflectedType.Name); } return(Convert.ToInt32(retorno)); }
public int insertarRegistro(ref Ent_twhcol020 parametro, ref string strError) { method = MethodBase.GetCurrentMethod(); bool retorno = false; try { strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla); parametrosIn = AdicionaParametrosComunes(parametro); retorno = DAL.BaseDAL.BaseDal.EjecutarCrud("text", strSentencia, ref parametersOut, parametrosIn, false); return(Convert.ToInt32(retorno)); } catch (Exception ex) { strError = ex.InnerException != null ? ex.Message + " (" + ex.InnerException + ")" : ex.Message; log.escribirError(strError + Console.Out.NewLine + ex.Message, stackTrace.GetFrame(1).GetMethod().Name, method.Name, method.ReflectedType.Name); } return(Convert.ToInt32(retorno)); }
public DataTable findRecordByItemClotCwarQtyr(ref Ent_tticol118 data, ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":T$CLOT", data.clot.Trim().ToUpper()); paramList.Add(":T$ITEM", data.item.Trim().ToUpper()); paramList.Add(":T$CWAR", data.cwar.Trim().ToUpper()); paramList.Add(":T$QTYR", data.qtyr); strSentencia = recursos.readStatement(method.ReflectedType.Name.Split('_')[0], 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 = "Incorrect location, please verify."; } } catch (Exception ex) { strError = "Error to the search sequence [tticol118_2]. 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(consulta); }
public DataTable listaRegistro_Clot(ref Ent_twhltc100 Parametros, ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":T$CLOT", Parametros.clot.Trim()); paramList.Add(":T$ITEM", Parametros.item.Trim()); strSQL = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList); try { consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSQL, ref parametersOut, null, true); if (consulta.Rows.Count < 1) { strError = "That Lot doesn't be Asociated to the Item."; } } catch (Exception ex) { strError = "Error to the search sequence [twhltc100]. 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(consulta); }
public DataTable findByItemAndPdno(ref string pdno, ref string item, ref string strError) { //JC 300721 Evitar Error Collection //consulta.Rows.Clear(); method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":T$SITM", item.Trim().ToUpper()); paramList.Add(":T$PDNO", pdno.Trim().ToUpper()); 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 = "Incorrect location, please verify."; } } catch (Exception ex) { strError = "Error to the search sequence [twhwmd300]. 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(consulta); }
public bool InsertTwhcol030(Entidades.Ent_ttwhcol030 ObjTwhcol030, ref string strError) { bool retorno = false; method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":T$CWOR", ObjTwhcol030.CWOR); paramList.Add(":T$CWDE", ObjTwhcol030.CWDE); paramList.Add(":T$ITEM", ObjTwhcol030.ITEM); paramList.Add(":T$QTDL", ObjTwhcol030.QTDL); paramList.Add(":T$CUNI", ObjTwhcol030.CUNI); paramList.Add(":T$RCNO", ObjTwhcol030.RCNO); paramList.Add(":T$DATE", ObjTwhcol030.DATE); //paramList.Add(":T$MESS", ObjTwhcol030.MESS); paramList.Add(":T$USER", ObjTwhcol030.USER); //paramList.Add(":T$REFCNTD", "0"); //paramList.Add(":T$REFCNTU", "0"); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList); try { retorno = DAL.BaseDAL.BaseDal.EjecutarCrud("text", strSentencia, ref parametersOut, parametrosIn, false); } catch (Exception ex) { strError = "Error: " + ex.Message + " " + strSentencia + " "; } return(retorno); }
public int insertarRegistro(ref List <Ent_tticol080> parametros, ref string strError, ref string strTagId) { method = MethodBase.GetCurrentMethod(); bool retorno = false; //Ent_twhcol018 obj018; //twhcol018 dal018 = new twhcol018(); try { //strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla); //int cant = parametros.Count; foreach (Ent_tticol080 reg in parametros) { //obj018 = new Ent_twhcol018(); //parametrosIn = AdicionaParametrosComunes(reg); method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":T$ORNO", reg.orno); paramList.Add(":T$PONO", reg.pono); paramList.Add(":T$CWAR", reg.cwar); paramList.Add(":T$ITEM", reg.item.Trim()); paramList.Add(":T$QUNE", reg.qune);//En ambiente local no funciona . con solo esta tabla(080), este funcionamiento es correcto en fusionpub. paramList.Add(":T$LOGN", reg.logn); paramList.Add(":T$DATE", reg.date); paramList.Add(":T$PROC", reg.proc); paramList.Add(":T$REFCNTD", reg.refcntd); paramList.Add(":T$REFCNTU", reg.refcntu); paramList.Add(":T$CLOT", reg.clot); paramList.Add(":T$OORG", reg.oorg); paramList.Add(":T$PICK", reg.pick); //strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList, 1); retorno = DAL.BaseDAL.BaseDal.EjecutarCrud("text", strSentencia, ref parametersOut, null, false); } return(Convert.ToInt32(retorno)); } catch (Exception ex) { strError = "Error when inserting data [tticol080]. Try again or contact your administrator"; log.escribirError(strError + Console.Out.NewLine + ex.Message, method.Module.Name, method.Name, method.ReflectedType.Name); } return(Convert.ToInt32(retorno)); }
public bool insertRegistertwhcol028(ref Ent_twhcol028 Obj028, ref string strError) { method = MethodBase.GetCurrentMethod(); bool retorno = false; try { paramList = new Dictionary <string, object>(); paramList.Add(":T$PAID", Obj028.PAID.Trim().ToUpper()); paramList.Add(":T$CDIS", Obj028.CDIS.Trim().ToUpper()); paramList.Add(":T$EMNO", Obj028.EMNO.Trim().ToUpper()); paramList.Add(":T$SITM", Obj028.SITM.Trim().ToUpper()); paramList.Add(":T$SWAR", Obj028.SWAR.Trim().ToUpper()); paramList.Add(":T$SLOC", Obj028.SLOC.Trim().ToUpper().Trim() == string.Empty ? " ":Obj028.SLOC.Trim().ToUpper().Trim()); paramList.Add(":T$SLOT", Obj028.SLOT.Trim().ToUpper().Trim() == string.Empty ? " ":Obj028.SLOT.Trim().ToUpper().Trim()); paramList.Add(":T$SQTY",Obj028.SQTY.Trim().ToUpper()); paramList.Add(":T$TITM",Obj028.TITM.Trim().ToUpper()); paramList.Add(":T$TWAR",Obj028.TWAR.Trim().ToUpper()); paramList.Add(":T$TLOC",Obj028.TLOC.Trim().ToUpper().Trim() == string.Empty ? " ":Obj028.TLOC.Trim().ToUpper().Trim()); paramList.Add(":T$TLOT",Obj028.TLOT.Trim().ToUpper().Trim() == string.Empty ? " ":Obj028.TLOT.Trim().ToUpper().Trim()); paramList.Add(":T$TQTY",Obj028.TQTY.Trim().ToUpper()); paramList.Add(":T$LOGN",Obj028.LOGN.Trim().ToUpper() == string.Empty ? "0" : Obj028.LOGN.Trim().ToUpper()); paramList.Add(":T$DATR",Obj028.DATR.Trim().ToUpper() == string.Empty ? "0" : Obj028.DATR.Trim().ToUpper()); paramList.Add(":T$PROC",Obj028.PROC.Trim().ToUpper() == string.Empty ? "0" : Obj028.PROC.Trim().ToUpper()); paramList.Add(":T$SORN",Obj028.SORN.Trim().ToUpper() == string.Empty ? "0" : Obj028.SORN.Trim().ToUpper()); paramList.Add(":T$SPON",Obj028.SPON.Trim().ToUpper() == string.Empty ? "0" : Obj028.SPON.Trim().ToUpper()); paramList.Add(":T$TORN",Obj028.TORN.Trim().ToUpper() == string.Empty ? "0" : Obj028.TORN.Trim().ToUpper()); paramList.Add(":T$TPON",Obj028.TPON.Trim().ToUpper() == string.Empty ? "0" : Obj028.TPON.Trim().ToUpper()); paramList.Add(":T$MESS",Obj028.MESS.Trim().ToUpper() == string.Empty ? "0" : Obj028.MESS.Trim().ToUpper()); paramList.Add(":T$REFCNTD",Obj028.REFCNTD.Trim().ToUpper() == string.Empty ? "0" : Obj028.REFCNTD.Trim().ToUpper()); paramList.Add(":T$REFCNTU",Obj028.REFCNTD.Trim().ToUpper() == string.Empty ? "0" : Obj028.REFCNTD.Trim().ToUpper()); strSentencia = recursos.readStatement(method.ReflectedType.Name,method.Name,ref owner,ref env,tabla,paramList); retorno = DAL.BaseDAL.BaseDal.EjecutarCrud("text",strSentencia,ref parametersOut,null,false); return(retorno); } catch (Exception ex) { strError = ex.InnerException != null ? ex.Message + " (" + ex.InnerException + ")" : ex.Message; } return(retorno); }
public int insertarRegistro(ref List <Ent_twhcol018> parametros, ref string strError, ref string strTagId) { method = MethodBase.GetCurrentMethod(); bool retorno = false; //string strTagId = string.Empty; List <Ent_ParametrosDAL> parameterCollection = new List <Ent_ParametrosDAL>(); try { //Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$TGID", DbType.String, parametros.tgid); //Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$ITEM", DbType.String, parametros.); //Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$CLOT", DbType.String, parametros.tgid); //Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$QTDL", DbType.String, parametros.tgid); //Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$CUNI", DbType.String, parametros.tgid); //Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$REFCNTD", DbType.String, parametros.tgid); //Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$REFCNTU", DbType.String, parametros.tgid); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla); foreach (Ent_twhcol018 reg in parametros) { //GRRC strTagId = nextTag_Id(reg, ref strError); if (!string.IsNullOrEmpty(strError)) { retorno = false; break; } reg.tgid = strTagId; parametrosIn = AdicionaParametrosComunes(reg); parametros[0].tgid = strTagId; retorno = DAL.BaseDAL.BaseDal.EjecutarCrud("text", strSentencia, ref parametersOut, parametrosIn, false); } return(Convert.ToInt32(retorno)); } catch (Exception ex) { strError = "Error al insertar en twhcol018. Try again or contact your administrator"; log.escribirError(strError + Console.Out.NewLine + ex.Message, method.Module.Name, method.Name, method.ReflectedType.Name); } return(Convert.ToInt32(retorno)); }
public DataTable ConsultarRegistroTransferir(string PAID) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":T$PAID", PAID.Trim().ToUpper()); DataTable retorno = new DataTable(); 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) { Console.WriteLine(ex); } return(retorno); }
/// <summary> /// Consultar etiqueta toma de materiales /// </summary> /// <param name="Ent_ttwhcol016">Objetos de tipo Entidad[Ent_ttwhcol016] con parametros a usar</param> /// <param name="strError">Cadena de error para controlar el resultado</param> /// <returns>DataTable: Tabla virtual con el registro correspondiente al parametro (En caso de existir) u Objeto nulo en caso contrario . </returns> public DataTable listaRegistrosMaquinas(ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, "tticol003", paramList); try { consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia, ref parametersOut, null, true); if (consulta.Rows.Count < 1) { strError = "No existen maquinas para procesar"; } return(consulta); } catch (Exception ex) { strError = "Error consultando tticol003. Intente de nuevo o contacte al administrador"; log.escribirError(strError + Console.Out.NewLine + ex.Message, stackTrace.GetFrame(1).GetMethod().Name, method.Name, method.ReflectedType.Name); } return(consulta); }
public bool insertRegistertwhcol019(ref Ent_twhcol019 objTwhcol019, ref string strError) { method = MethodBase.GetCurrentMethod(); bool retorno = false; try { paramList = new Dictionary <string, object>(); paramList.Add(":T$PAID", objTwhcol019.PAID.Trim().ToUpper()); paramList.Add(":T$SQNB", objTwhcol019.SQNB); paramList.Add(":T$ZONE", objTwhcol019.ZONE.ToUpper()); paramList.Add(":T$CWAR", objTwhcol019.CWAR.Trim().ToUpper()); paramList.Add(":T$LOCA", objTwhcol019.LOCA.ToUpper()); paramList.Add(":T$ITEM", objTwhcol019.ITEM); paramList.Add(":T$CLOT", objTwhcol019.CLOT.ToUpper()); paramList.Add(":T$QTDL", objTwhcol019.QTDL); paramList.Add(":T$CUNI", objTwhcol019.CUNI.Trim()); paramList.Add(":T$LOGN", objTwhcol019.LOGN.ToUpper().Trim()); paramList.Add(":T$DATE", objTwhcol019.DATE); paramList.Add(":T$COUN", objTwhcol019.COUN); paramList.Add(":T$PROC", objTwhcol019.PROC); paramList.Add(":T$REFCNTD", objTwhcol019.REFCNTD); paramList.Add(":T$REFCNTU", objTwhcol019.REFCNTU); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList); retorno = DAL.BaseDAL.BaseDal.EjecutarCrud("text", strSentencia, ref parametersOut, null, false); return(retorno); } catch (Exception ex) { strError = ex.InnerException != null ? ex.Message + " (" + ex.InnerException + ")" : ex.Message; } return(retorno); }
public int insertRecord(ref Ent_tticol180 parametro, ref string strError) { method = MethodBase.GetCurrentMethod(); bool retorno = false; try { strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla); parametrosIn = AdicionaParametrosComunes(parametro); retorno = DAL.BaseDAL.BaseDal.EjecutarCrud("text", strSentencia, ref parametersOut, parametrosIn, false); return(Convert.ToInt32(retorno)); } catch (Exception ex) { strError = ex.InnerException != null ? ex.Message + " (" + ex.InnerException + ")" : ex.Message; } return(Convert.ToInt32(retorno)); }
public DataTable listaRegistrosMenu_Param(ref Ent_ttccol300 ParametrosIn, ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add("p1", ParametrosIn.user); 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 = "-1"; } return(consulta); } catch (Exception ex) { strError = "Error when querying data [ttccol303]. Try again or contact your administrator"; throw ex; } }
public bool ActualizarUsuariotccol307(Ent_ttccol307 ObjTtccol307) { string strError = string.Empty; bool ActualizacionExitosa = false; method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":PAID", ObjTtccol307.PAID); paramList.Add(":USER", ObjTtccol307.USRR); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList); try { ActualizacionExitosa = DAL.BaseDAL.BaseDal.EjecutarCrud("Text", strSentencia, ref parametersOut, null, false); } catch (Exception ex) { strError = "Error when querying data [ttccol303]. Try again or contact your administrator"; throw ex; } return(ActualizacionExitosa); }
public DataTable VerificarExistenciaCustomer(Ent_ttccom110 ObjTtccom110) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":T$BPID", ObjTtccom110.BPID); 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); } catch (Exception ex) { } return(consulta); }
public DataTable listaRegistro_ObtieneAlmacen(ref Ent_twhwmd300 Parametros, ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":T$LOCA", Parametros.loca.Trim()); strSQL = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList); try { consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSQL, ref parametersOut, null, true); if (consulta.Rows.Count < 1) { strError = "Location incorrect, please check."; } } catch (Exception ex) { strError = "Error to the search sequence [twhwmd300]. 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(consulta); }
public DataTable TraerOrdenesCustomer(Ent_twhinh220 Objtwhinh220, ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":T$STAD", Objtwhinh220.STAD); paramList.Add(":T$PDDT", Objtwhinh220.PDDT); 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); } catch (Exception ex) { strError = "Error: " + ex.Message + " " + strSentencia + " "; } return(consulta); }
public int insertarRegistro(ref List <Ent_ttwhcol016> parametros, ref string strError) { method = MethodBase.GetCurrentMethod(); bool retorno = false; string MsgstrError = string.Empty; try { strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla); foreach (Ent_ttwhcol016 reg in parametros) { parametrosIn = AdicionaParametrosComunes(reg); MsgstrError = "Error when inserting data [ttwhcol016]. "; retorno = DAL.BaseDAL.BaseDal.EjecutarCrud("text", strSentencia, ref parametersOut, parametrosIn, false); paramList = new Dictionary <string, object>(); paramList.Add("p1", reg.zone.Trim().ToUpperInvariant()); strSentencia = recursos.readStatement(method.ReflectedType.Name, "actualizarSecuenciaInsert", ref owner, ref env, tabla, paramList); //" SET t$ffno = (SELECT MAX(t$ffno) " + // "FROM " + owner + ".ttcmcs050" + env + // " WHERE TRIM(T$NRGR) = '" + reg.zone.Trim() + "') + ROWNUM " + MsgstrError = "Error al Actualizar ttcmcs050. "; retorno = DAL.BaseDAL.BaseDal.EjecutarCrud("text", strSentencia, ref parametersOut, null, false); } return(Convert.ToInt32(retorno)); } catch (Exception ex) { strError = MsgstrError + "Try again or contact your administrator"; log.escribirError(strError + Console.Out.NewLine + ex.Message, method.Module.Name, method.Name, method.ReflectedType.Name); } return(Convert.ToInt32(retorno)); }
public DataTable LimitePorArticuloyMaquinaTticol110(string mcno, string item, ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":T$MCNO", mcno.Trim().ToUpper()); paramList.Add(":T$ITEM", item.Trim().ToUpper()); 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 = "Incorrect location, please verify."; } } catch (Exception ex) { strError = "Error to the search quantity [tticol110]. 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(consulta); }
public DataTable Delete182Zero() { method = MethodBase.GetCurrentMethod(); DataTable retorno = new DataTable(); try { paramList = new Dictionary <string, object>(); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList); retorno = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentencia, ref parametersOut, null, true); return(retorno); } catch (Exception ex) { Console.WriteLine(ex.Message); } return(retorno); }
public DataTable listaRegistro_ObtieneConteo(ref Ent_twhcol002 Parametros, ref string strError) { method = MethodBase.GetCurrentMethod(); paramList = new Dictionary <string, object>(); paramList.Add(":T$CWAR", Parametros.cwar.Trim()); strSQL = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla, paramList); try { consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSQL, ref parametersOut, null, true); if (consulta.Rows.Count < 1) { strError = "There is no active count for the warehouse." + Parametros.cwar.Trim(); } } catch (Exception ex) { strError = "Error to the search sequence [twhcol002]. 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(consulta); }
public DataTable SelectRegister(ref Ent_tticol119 Obj119, ref string strError) { Dictionary <string, object> paramList = new Dictionary <string, object>(); paramList.Add(":T$PAID", Obj119.paid); paramList.Add(":T$CWAR", Obj119.cwar); paramList.Add(":T$ITEM", Obj119.item); paramList.Add(":T$CLOT", Obj119.clot); paramList.Add(":DATEI", Obj119.dati); paramList.Add(":DATEF", Obj119.datf); string strSentenciaS = recursos.readStatement(method.ReflectedType.Name, "SelectRegister", ref owner, ref env, tabla, paramList); try { consulta = DAL.BaseDAL.BaseDal.EjecutarCons("Text", strSentenciaS, ref parametersOut, null, true); } catch (Exception ex) { strError = "Error al buscar informacion para imprimir [tticol119]. Try again or contact your administrator \n " + strSentencia; log.escribirError(strError + ex.Message, stackTrace.GetFrame(1).GetMethod().Name, method.Name, method.ReflectedType.Name); } return(consulta); }
public int insertarRegistro(ref Ent_tticol116 parametro, ref string strError) { method = MethodBase.GetCurrentMethod(); bool retorno = false; try { paramList = new Dictionary <string, object>(); paramList.Add(":T$ITEM", parametro.item.Trim().ToUpper()); paramList.Add(":T$CWAR", parametro.cwar.Trim().ToUpper()); paramList.Add(":T$LOCA", parametro.loca.Trim().ToUpper()); paramList.Add(":T$CLOT", parametro.clot.Trim().ToUpper()); paramList.Add(":T$QTYR", parametro.qtyr.ToString().Replace(',', '.')); paramList.Add(":T$CDIS", parametro.cdis.Trim().ToUpper()); paramList.Add(":T$OBSE", parametro.obse.Trim().ToUpper()); paramList.Add(":T$LOGR", parametro.logr.Trim().ToUpper()); paramList.Add(":T$DISP", parametro.disp); paramList.Add(":T$PROC", parametro.proc); paramList.Add(":T$MESS", parametro.mess.Trim().ToUpper()); paramList.Add(":T$SUNO", parametro.suno.Trim().ToUpper()); paramList.Add(":T$CWAM", parametro.cwam.Trim().ToUpper()); paramList.Add(":T$PAID", parametro.paid.Trim().ToUpper()); paramList.Add(":T$PAIO", parametro.paio.Trim().ToUpper() == String.Empty ? " " : parametro.paio.Trim().ToUpper()); paramList.Add(":T$REFCNTD", 0); paramList.Add(":T$REFCNTU", 0); strSentencia = recursos.readStatement(method.ReflectedType.Name, method.Name, ref owner, ref env, tabla); parametrosIn = AdicionaParametrosComunes(parametro); retorno = DAL.BaseDAL.BaseDal.EjecutarCrud("text", strSentencia, ref parametersOut, parametrosIn, false); return(Convert.ToInt32(retorno)); } catch (Exception ex) { strError = ex.InnerException != null ? ex.Message + " (" + ex.InnerException + ")" : ex.Message; } return(Convert.ToInt32(retorno)); }