public bool updateRecord(ref Ent_tticol180 data, ref string strError) { method = MethodBase.GetCurrentMethod(); bool retorno = false; try { paramList = new Dictionary <string, object>(); paramList.Add(":T$MSSH", data.mssh.Trim()); paramList.Add(":T$SEND", data.send); paramList.Add(":T$DOCN", data.docn.Trim()); paramList.Add(":T$PATH", data.path.Trim()); paramList.Add(":T$USER", data.user.ToLower().Trim()); 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); }
private List <Ent_ParametrosDAL> AdicionaParametrosComunes(Ent_tticol180 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$DOCN", DbType.String, parametros.docn); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$USER", DbType.String, parametros.user); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$SEND", DbType.String, parametros.send); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$PATH", DbType.String, parametros.path); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$MSSH", DbType.String, parametros.mssh); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$REFCNTD", DbType.Int32, parametros.refcntd); Ent_ParametrosDAL.AgregaParametro(ref parameterCollection, ":T$REFCNTU", DbType.Int32, parametros.refcntu); 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 [301]. 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); }
public List <Ent_tticol180> listRecordSendEmail(ref string strError) { List <Ent_tticol180> retorno = new List <Ent_tticol180>(); DataTable dt = new DataTable(); try { dt = dal.listRecordSendEmail(ref strError); foreach (DataRow item in dt.Rows) { Ent_tticol180 registro = new Ent_tticol180() { docn = item["DOCN"].ToString(), user = item["CUSER"].ToString(), path = item["CPATH"].ToString(), tgbrg835_name = item["CNAME"].ToString(), tgbrg835_mail = item["CMAIL"].ToString() }; retorno.Add(registro); } return(retorno); } catch (Exception ex) { throw new Exception(strError += "\nPila: " + ex.Message); } }
public bool updateRecord(ref Ent_tticol180 data, ref string strError) { bool retorno = false; try { retorno = dal.updateRecord(ref data, ref strError); return(retorno); } catch (Exception ex) { throw new Exception(strError += "\nPila: " + ex.Message); } }
public int insertRecord(ref Ent_tticol180 parametrosIn, ref string strError) { int retorno = -1; try { retorno = dal.insertRecord(ref parametrosIn, ref strError); return(retorno); } catch (Exception ex) { throw new Exception(strError += "\nPila: " + ex.Message); } }
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)); }