/// <summary> /// Actualiza el estado de la transacción pendiente a procesada. /// </summary> /// <param name="transaccion">Datos de la Transacción</param> /// <returns> /// Retorna cero si se ha guardado correctamente, valor distinto a cero /// si se presenta algún error. /// </returns> private string ActualizarTransaccion(ETransaccion transaccion) { string sres = string.Empty; int nres = 0; try { DataAccessLayerBaseClass dal = DataAccessLayerFactory.GetDataAccessLayer(); IDataParameter[] opar = new IDataParameter[4]; opar[0] = dal.CreateParameter("presult", ParameterDirection.Output, nres, DbType.Int32, null, 0); opar[1] = dal.CreateParameter("pmessage", ParameterDirection.Output, sres, DbType.String, null, 0); opar[2] = dal.CreateParameter("pidtransaccion", ParameterDirection.Input, transaccion.IdTransaccion, DbType.Guid, null, 0); opar[3] = dal.CreateParameter("pestado", ParameterDirection.Input, 1, DbType.Double, null, 0); int dae = dal.ExecuteQuery("sp_update_ps_transaccion", CommandType.StoredProcedure, opar); } catch (Exception ex) { sres = "201"; Logger.ErrorLog.RegErrorDB(Logger.NivelDeError.Cinco, sres, this.ToString(), "sp_update_ps_transaccion", ex.Message + "|" + ex.StackTrace); } return(sres); }
public MenuInfo Load(string string_2) { DataAccessLayerBaseClass dataAccessLayer = DataAccessLayerFactory.GetDataAccessLayer(this.dataProviderType_0, this.string_1); dataAccessLayer.Open(); DataTable table = dataAccessLayer.ExecuteDataTable("select * from " + this.string_0 + " where MenuID=" + string_2); MenuInfo info = null; if (table.Rows.Count > 0) { DataRow row = table.Rows[0]; info = new MenuInfo { MenuID = Convert.ToString(row["MenuID"]) }; object obj1 = row["NAME"]; info.NAME = Convert.ToString(row["NAME"]); info.ORDERBY = new int?(!(row["ORDERBY"] is DBNull) ? Convert.ToInt32(row["ORDERBY"]) : -1); info.PROGID = Convert.ToString(row["PROGID"]); info.SHORTCUT = Convert.ToString(row["SHORTCUT"]); info.SUBTYPE = new int?(!(row["SUBTYPE"] is DBNull) ? Convert.ToInt32(row["SUBTYPE"]) : -1); info.VISIBLE = new bool?(!(row["VISIBLE"] is DBNull) ? (Convert.ToInt32(row["VISIBLE"]) == 1) : true); info.ItemCol = new int?(!(row["ItemCol"] is DBNull) ? Convert.ToInt32(row["ItemCol"]) : -1); info.ISPOPMENUITEM = new bool?(!(row["ISPOPMENUITEM"] is DBNull) ? (Convert.ToInt32(row["ISPOPMENUITEM"]) == 1) : false); info.COMPONENTDLLNAME = Convert.ToString(row["COMPONENTDLLNAME"]); info.CLASSNAME = Convert.ToString(row["CLASSNAME"]); info.BEGINGROUP = new bool?(!(row["BEGINGROUP"] is DBNull) ? (Convert.ToInt32(row["BEGINGROUP"]) == 1) : false); info.CAPTION = Convert.ToString(row["CAPTION"]); info.PARENTIDS = Convert.ToString(row["PARENTIDS"]); } dataAccessLayer.Close(); return(info); }
public void Execute(IServiceProvider serviceProvider) { var tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); PluginContext = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext)); if (!PluginContext.InputParameters.Contains("Target") || !(PluginContext.InputParameters["Target"] is Entity)) { return; } Entity = (Entity)PluginContext.InputParameters["Target"]; if (Entity.LogicalName != ExpectedEntityLogicalName) { return; } IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory)); OrganizationService = serviceFactory.CreateOrganizationService(PluginContext.UserId); DataAccessLayerFactory = new DataAccessLayerFactory(OrganizationService, tracingService); CustomTracingService = DataAccessLayerFactory.GetTracingService(); try { PostExecute(serviceProvider); } catch (FaultException <OrganizationServiceFault> ex) { throw new InvalidPluginExecutionException("An error occurred in this plug-in.", ex); } catch (Exception ex) { CustomTracingService.Trace("Plugin Exception: {0}", ex.ToString()); throw; } }
protected override void Execute(CodeActivityContext executionContext) { var serviceFactory = executionContext.GetExtension <IOrganizationServiceFactory>(); var tracingService = executionContext.GetExtension <ITracingService>(); WorkflowContext = executionContext.GetExtension <IWorkflowContext>(); OrganizationService = serviceFactory.CreateOrganizationService(WorkflowContext.UserId); try { using (DataAccessLayerFactory = new DataAccessLayerFactory(OrganizationService, tracingService)) { CustomTracingService = DataAccessLayerFactory.GetTracingService(); PostExecute(executionContext); } } catch (FaultException <OrganizationServiceFault> ex) { throw new InvalidPluginExecutionException("An error occurred in the UpdateActivities plug-in.", ex); } catch (Exception ex) { CustomTracingService.Trace("FollowupPlugin: {0}", ex.ToString()); throw; } }
public MenuInfo GetByClassName(string string_2, string string_3) { MenuInfo menuInfo = null; try { DataAccessLayerBaseClass dataAccessLayer = DataAccessLayerFactory.GetDataAccessLayer(this.dataProviderType_0, this.string_1); dataAccessLayer.Open(); DataTable dataTable = dataAccessLayer.ExecuteDataTable(string.Concat(new string[] { "select * from ", this.string_0, " where COMPONENTDLLNAME='", string_2, "' and CLASSNAME='", string_3, "'" })); if (dataTable.Rows.Count > 0) { DataRow dataRow = dataTable.Rows[0]; menuInfo = new MenuInfo(); menuInfo.MenuID = System.Convert.ToString(dataRow["MenuID"]); menuInfo.NAME = System.Convert.ToString(dataRow["NAME"]); object arg_C4_0 = dataRow["ORDERBY"]; menuInfo.ORDERBY = new int?((!(dataRow["ORDERBY"] is System.DBNull)) ? System.Convert.ToInt32(dataRow["ORDERBY"]) : -1); menuInfo.PROGID = System.Convert.ToString(dataRow["PROGID"]); menuInfo.SHORTCUT = System.Convert.ToString(dataRow["SHORTCUT"]); menuInfo.SUBTYPE = new int?((!(dataRow["SUBTYPE"] is System.DBNull)) ? System.Convert.ToInt32(dataRow["SUBTYPE"]) : -1); menuInfo.VISIBLE = new bool?(dataRow["VISIBLE"] is System.DBNull || System.Convert.ToInt32(dataRow["VISIBLE"]) == 1); menuInfo.ItemCol = new int?((!(dataRow["ItemCol"] is System.DBNull)) ? System.Convert.ToInt32(dataRow["ItemCol"]) : -1); menuInfo.ISPOPMENUITEM = new bool?(!(dataRow["ISPOPMENUITEM"] is System.DBNull) && System.Convert.ToInt32(dataRow["ISPOPMENUITEM"]) == 1); menuInfo.COMPONENTDLLNAME = System.Convert.ToString(dataRow["COMPONENTDLLNAME"]); menuInfo.CLASSNAME = System.Convert.ToString(dataRow["CLASSNAME"]); menuInfo.BEGINGROUP = new bool?(!(dataRow["BEGINGROUP"] is System.DBNull) && System.Convert.ToInt32(dataRow["BEGINGROUP"]) == 1); menuInfo.CAPTION = System.Convert.ToString(dataRow["CAPTION"]); menuInfo.PARENTIDS = System.Convert.ToString(dataRow["PARENTIDS"]); } dataAccessLayer.Close(); } catch { } return(menuInfo); }
public void Update(MenuInfo menuInfo_0) { string str = string.Format("update {0} set PARENTIDS='{1}' where MenuID={2}", this.string_0, string.IsNullOrEmpty(menuInfo_0.PARENTIDS) ? "NULL" : ("'" + menuInfo_0.PARENTIDS + "'"), menuInfo_0.MenuID); DataAccessLayerBaseClass dataAccessLayer = DataAccessLayerFactory.GetDataAccessLayer(this.dataProviderType_0, this.string_1); dataAccessLayer.Open(); dataAccessLayer.ExecuteNonQuery(CommandType.Text, str); dataAccessLayer.Close(); }
public override void PostExecute(CodeActivityContext executionContext) { var input = AccountGuid.Get <string>(executionContext); var accountId = input == Guid.Empty.ToString().Trim('{').Trim('}') ? WorkflowContext.PrimaryEntityId : Guid.Parse(input); CustomTracingService.Trace("Input value {0}", input); var updateEmailLogic = new UpdateEmailLogic(DataAccessLayerFactory.GetEmailDataAccessLayer(), CustomTracingService); updateEmailLogic.UpdateAccountsEmails(accountId); }
public int Add(MenuInfo menuInfo_0) { if (!this.IsExist(menuInfo_0)) { string str = string.Format("insert into {0}([NAME],PARENTIDS,ORDERBY,[PROGID],[SHORTCUT],SUBTYPE,VISIBLE,ItemCol,ISPOPMENUITEM,COMPONENTDLLNAME,CLASSNAME,BEGINGROUP,CAPTION) values({1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13})", new object[] { this.string_0, string.IsNullOrEmpty(menuInfo_0.NAME) ? "NULL" : ("'" + menuInfo_0.NAME + "'"), string.IsNullOrEmpty(menuInfo_0.PARENTIDS) ? "NULL" : ("'" + menuInfo_0.PARENTIDS + "'"), menuInfo_0.ORDERBY.HasValue ? menuInfo_0.ORDERBY.Value.ToString() : "NULL", string.IsNullOrEmpty(menuInfo_0.PROGID) ? "NULL" : ("'" + menuInfo_0.PROGID + "'"), string.IsNullOrEmpty(menuInfo_0.SHORTCUT) ? "NULL" : ("'" + menuInfo_0.SHORTCUT + "'"), menuInfo_0.SUBTYPE.HasValue ? menuInfo_0.SUBTYPE.Value.ToString() : "NULL", menuInfo_0.VISIBLE.HasValue ? (menuInfo_0.VISIBLE.Value ? "1" : "0") : "NULL", menuInfo_0.ItemCol.HasValue ? menuInfo_0.ItemCol.Value.ToString() : "NULL", menuInfo_0.ISPOPMENUITEM.HasValue ? (menuInfo_0.ISPOPMENUITEM.Value ? "1" : "0") : "NULL", string.IsNullOrEmpty(menuInfo_0.COMPONENTDLLNAME) ? "NULL" : ("'" + menuInfo_0.COMPONENTDLLNAME + "'"), string.IsNullOrEmpty(menuInfo_0.CLASSNAME) ? "NULL" : ("'" + menuInfo_0.CLASSNAME + "'"), menuInfo_0.BEGINGROUP.HasValue ? (menuInfo_0.BEGINGROUP.Value ? "1" : "0") : "NULL", string.IsNullOrEmpty(menuInfo_0.CAPTION) ? "NULL" : ("'" + menuInfo_0.CAPTION + "'") }); DataAccessLayerBaseClass dataAccessLayer = DataAccessLayerFactory.GetDataAccessLayer(this.dataProviderType_0, this.string_1); dataAccessLayer.Open(); dataAccessLayer.ExecuteNonQuery(CommandType.Text, str); dataAccessLayer.Close(); } return(0); }
public void ClearAll() { try { DataAccessLayerBaseClass dataAccessLayer = DataAccessLayerFactory.GetDataAccessLayer(this.dataProviderType_0, this.string_1); dataAccessLayer.Open(); dataAccessLayer.ExecuteNonQuery("delete from " + this.string_0, new object[0]); dataAccessLayer.Close(); } catch { } }
public System.Collections.Generic.List <MenuInfo> Load() { System.Collections.Generic.List <MenuInfo> list = new System.Collections.Generic.List <MenuInfo>(); try { DataAccessLayerBaseClass dataAccessLayer = DataAccessLayerFactory.GetDataAccessLayer(this.dataProviderType_0, this.string_1); dataAccessLayer.Open(); DataTable dataTable = dataAccessLayer.ExecuteDataTable("select * from " + this.string_0); for (int i = 0; i < dataTable.Rows.Count; i++) { DataRow dataRow = dataTable.Rows[i]; MenuInfo menuInfo = new MenuInfo(); menuInfo.MenuID = System.Convert.ToString(dataRow["MenuID"]); menuInfo.NAME = System.Convert.ToString(dataRow["NAME"]); object arg_8E_0 = dataRow["ORDERBY"]; menuInfo.ORDERBY = new int?((!(dataRow["ORDERBY"] is System.DBNull)) ? System.Convert.ToInt32(dataRow["ORDERBY"]) : -1); menuInfo.PROGID = System.Convert.ToString(dataRow["PROGID"]); menuInfo.SHORTCUT = System.Convert.ToString(dataRow["SHORTCUT"]); menuInfo.SUBTYPE = new int?((!(dataRow["SUBTYPE"] is System.DBNull)) ? System.Convert.ToInt32(dataRow["SUBTYPE"]) : -1); menuInfo.VISIBLE = new bool?(dataRow["VISIBLE"] is System.DBNull || System.Convert.ToInt32(dataRow["VISIBLE"]) == 1); menuInfo.ItemCol = new int?((!(dataRow["ItemCol"] is System.DBNull)) ? System.Convert.ToInt32(dataRow["ItemCol"]) : -1); menuInfo.ISPOPMENUITEM = new bool?(!(dataRow["ISPOPMENUITEM"] is System.DBNull) && System.Convert.ToInt32(dataRow["ISPOPMENUITEM"]) == 1); menuInfo.COMPONENTDLLNAME = System.Convert.ToString(dataRow["COMPONENTDLLNAME"]); menuInfo.CLASSNAME = System.Convert.ToString(dataRow["CLASSNAME"]); menuInfo.PARENTIDS = System.Convert.ToString(dataRow["PARENTIDS"]); menuInfo.BEGINGROUP = new bool?(!(dataRow["BEGINGROUP"] is System.DBNull) && System.Convert.ToInt32(dataRow["BEGINGROUP"]) == 1); menuInfo.CAPTION = System.Convert.ToString(dataRow["CAPTION"]); list.Add(menuInfo); } dataAccessLayer.Close(); } catch { } return(list); }
private void btnTestConnection_Click(object sender, EventArgs e) { DataProviderType oleDb = DataProviderType.OleDb; string str = ""; if (this.radioGroup1.SelectedIndex == 0) { str = this.SQLTemplete.Replace("#SERVER#", this.txtServer.Text) .Replace("#USER#", this.txtUser.Text) .Replace("#PASSWORD#", this.txtPassword.Text) .Replace("#DATABASE#", this.txtDatabase.Text); oleDb = DataProviderType.Sql; } else if (this.radioGroup1.SelectedIndex == 1) { str = this.OraceleTemplete.Replace("#SERVER#", this.txtServer.Text) .Replace("#USER#", this.txtUser.Text) .Replace("#PASSWORD#", this.txtPassword.Text); oleDb = DataProviderType.OleDb; } else { str = this.OLETemplete.Replace("#DATABASE#", this.txtServer.Text); } if (str != "") { DataAccessLayerBaseClass dataAccessLayer = DataAccessLayerFactory.GetDataAccessLayer(oleDb, str); try { try { if (dataAccessLayer.Open()) { MessageBox.Show("连接成功!"); dataAccessLayer.Close(); } } catch (Exception exception) { MessageBox.Show(exception.Message); } } finally { } } }
/// <summary> /// Persiste los datos de la transacción. /// </summary> /// <param name="transaccion">Datos de la Transacción</param> /// <param name="resultado">Resultado del envío de la Transacción</param> private void Persistir(ETransaccion transaccion, string resultado) { string sres = string.Empty; int estado = 0; JavaScriptSerializer oSerializer = new JavaScriptSerializer(); if (transaccion.TipoOperacion != Operacion.Registrar) { estado = 1; } //else // if (resultado == "0") // estado = 1; transaccion.Modo = 1; try { DataAccessLayerBaseClass dal = DataAccessLayerFactory.GetDataAccessLayer(); IDataParameter[] opar = new IDataParameter[8]; opar[0] = dal.CreateParameter("pCodigo", ParameterDirection.Output, null , DbType.Int32, null, 0); opar[1] = dal.CreateParameter("pMensaje", ParameterDirection.Output, null , DbType.String, null, 500); opar[2] = dal.CreateParameter("pCodigoTransaccion", ParameterDirection.Input, transaccion.Transaccion , DbType.Int32, null, 0); opar[3] = dal.CreateParameter("pDatos", ParameterDirection.Input, oSerializer.Serialize(transaccion) , DbType.StringFixedLength, null, 0); opar[4] = dal.CreateParameter("pRespuesta", ParameterDirection.Input, resultado , DbType.StringFixedLength, null, 0); opar[5] = dal.CreateParameter("pEstado", ParameterDirection.Input, estado , DbType.Double, null, 0); opar[6] = dal.CreateParameter("pTerminal", ParameterDirection.Input, transaccion.Terminal , DbType.String, null, 0); opar[7] = dal.CreateParameter("pVersion", ParameterDirection.Input, transaccion.Version , DbType.String, null, 0); int dae = dal.ExecuteQuery("Movil.sprRegistrarTransaccion", CommandType.StoredProcedure, opar); sres = "0"; } catch (Exception ex) { sres = "201"; Logger.ErrorLog.RegErrorDB(Logger.NivelDeError.Cinco, sres, this.ToString(), "Movil.sprRegistrarTransaccion", ex.Message + "|" + ex.StackTrace); } }
public string GetCodeByName(string string_8) { DataAccessLayerBaseClass dataAccessLayer = DataAccessLayerFactory.GetDataAccessLayer( DataProviderType.OleDb, this.ConnectionStr); string str = string.Format("select {0},{1} from {2} where {0}='{3}'", new object[] { this.NameFieldName, this.CodeFieldName, this.TableFieldName, string_8 }); dataAccessLayer.Open(); DataTable table = dataAccessLayer.ExecuteDataTable(str); if (table.Rows.Count > 0) { string_8 = table.Rows[0][this.CodeFieldName].ToString(); } dataAccessLayer.Close(); return(string_8); }
public void AddTreeviewComBoBox(string string_2, object object_0, object object_1, bool bool_0) { this.repositoryItemTreeViewComboBoxEdit_0 = new RepositoryItemTreeViewComboBoxEdit(); this.gridEditorCollection_0.Add(this.repositoryItemTreeViewComboBoxEdit_0, string_2, object_0); if (object_1 is CodeDomainEx.CodeDomainEx) { CodeDomainEx.CodeDomainEx ex = object_1 as CodeDomainEx.CodeDomainEx; DataAccessLayerBaseClass dataAccessLayer = DataAccessLayerFactory.GetDataAccessLayer(DataProviderType.OleDb, ex.ConnectionStr); this.repositoryItemTreeViewComboBoxEdit_0.DataAccessLayerBaseClass = dataAccessLayer; this.repositoryItemTreeViewComboBoxEdit_0.TableName = ex.TableFieldName; this.repositoryItemTreeViewComboBoxEdit_0.CodeFieldName = ex.CodeFieldName; this.repositoryItemTreeViewComboBoxEdit_0.NameFieldName = ex.NameFieldName; this.repositoryItemTreeViewComboBoxEdit_0.ParentIDFieldName = ex.ParentIDFieldName; this.repositoryItemTreeViewComboBoxEdit_0.IDFieldName = ex.IDFieldName; } this.repositoryItemTreeViewComboBoxEdit_0.ReadOnly = bool_0; }
public bool IsExist(MenuInfo menuInfo_0) { string str = ""; if (string.IsNullOrEmpty(menuInfo_0.PROGID)) { str = string.Format("select * from {0} where COMPONENTDLLNAME='{1}' and CLASSNAME='{2}'", this.string_0, menuInfo_0.COMPONENTDLLNAME, menuInfo_0.CLASSNAME); } else { str = string.Format("select * from {0} where PROGID='{1}' ", this.string_0, menuInfo_0.PROGID); } DataAccessLayerBaseClass dataAccessLayer = DataAccessLayerFactory.GetDataAccessLayer(this.dataProviderType_0, this.string_1); dataAccessLayer.Open(); DataTable table = dataAccessLayer.ExecuteDataTable(str); dataAccessLayer.Close(); return(table.Rows.Count > 0); }
public NameValueCollection GetCodeDomain() { NameValueCollection values = new NameValueCollection(); DataAccessLayerBaseClass dataAccessLayer = DataAccessLayerFactory.GetDataAccessLayer( DataProviderType.OleDb, this.ConnectionStr); string str = string.Format("select {0},{1} from {2}", this.NameFieldName, this.CodeFieldName, this.TableFieldName); dataAccessLayer.Open(); DataTable table = dataAccessLayer.ExecuteDataTable(str); for (int i = 0; i < table.Rows.Count; i++) { string name = table.Rows[i][this.NameFieldName].ToString().Trim(); string str3 = table.Rows[i][this.CodeFieldName].ToString().Trim(); values.Add(name, str3); } dataAccessLayer.Close(); return(values); }
public static NameValueCollection GetCodeDomain(string string_0, NameValueCollection nameValueCollection_0) { if (m_pDomainTable == null) { m_pDomainTable = AppConfigInfo.OpenTable(CodeDomainTableStruct.TableName); } if (m_pDomainTable != null) { string str = string.Format("{0}='{1}'", CodeDomainTableStruct.DomainIDFieldName, string_0); IQueryFilter queryFilter = new QueryFilter { WhereClause = str }; ICursor o = m_pDomainTable.Search(queryFilter, false); IRow row = o.NextRow(); int index = m_pDomainTable.FindField(CodeDomainTableStruct.ConnectionFieldName); int num2 = m_pDomainTable.FindField(CodeDomainTableStruct.TableFieldName); int num3 = m_pDomainTable.FindField(CodeDomainTableStruct.DescriptionFieldName); int num4 = m_pDomainTable.FindField(CodeDomainTableStruct.ValueFieldName); if (row != null) { string str2 = row.get_Value(num2).ToString(); string str3 = row.get_Value(index).ToString(); string str4 = row.get_Value(num3).ToString(); string str5 = row.get_Value(num4).ToString(); DataAccessLayerBaseClass dataAccessLayer = DataAccessLayerFactory.GetDataAccessLayer(DataProviderType.OleDb, str3); string str6 = string.Format("select {0},{1} from {2}", str4, str5, str2); dataAccessLayer.Open(); DataTable table = dataAccessLayer.ExecuteDataTable(str6); for (int i = 0; i < table.Rows.Count; i++) { string name = table.Rows[i][str4].ToString().Trim(); string str8 = table.Rows[i][str5].ToString().Trim(); nameValueCollection_0.Add(name, str8); } } ComReleaser.ReleaseCOMObject(o); } return(nameValueCollection_0); }
public List <MenuInfo> Load() { List <MenuInfo> list = new List <MenuInfo>(); try { DataAccessLayerBaseClass dataAccessLayer = DataAccessLayerFactory.GetDataAccessLayer(this.dataProviderType_0, this.string_1); dataAccessLayer.Open(); DataTable table = dataAccessLayer.ExecuteDataTable("select * from " + this.string_0); for (int i = 0; i < table.Rows.Count; i++) { DataRow row = table.Rows[i]; MenuInfo item = new MenuInfo { MenuID = Convert.ToString(row["MenuID"]), NAME = Convert.ToString(row["NAME"]) }; object obj1 = row["ORDERBY"]; item.ORDERBY = new int?(!(row["ORDERBY"] is DBNull) ? Convert.ToInt32(row["ORDERBY"]) : -1); item.PROGID = Convert.ToString(row["PROGID"]); item.SHORTCUT = Convert.ToString(row["SHORTCUT"]); item.SUBTYPE = new int?(!(row["SUBTYPE"] is DBNull) ? Convert.ToInt32(row["SUBTYPE"]) : -1); item.VISIBLE = new bool?(!(row["VISIBLE"] is DBNull) ? (Convert.ToInt32(row["VISIBLE"]) == 1) : true); item.ItemCol = new int?(!(row["ItemCol"] is DBNull) ? Convert.ToInt32(row["ItemCol"]) : -1); item.ISPOPMENUITEM = new bool?(!(row["ISPOPMENUITEM"] is DBNull) ? (Convert.ToInt32(row["ISPOPMENUITEM"]) == 1) : false); item.COMPONENTDLLNAME = Convert.ToString(row["COMPONENTDLLNAME"]); item.CLASSNAME = Convert.ToString(row["CLASSNAME"]); item.PARENTIDS = Convert.ToString(row["PARENTIDS"]); item.BEGINGROUP = new bool?(!(row["BEGINGROUP"] is DBNull) ? (Convert.ToInt32(row["BEGINGROUP"]) == 1) : false); item.CAPTION = Convert.ToString(row["CAPTION"]); list.Add(item); } dataAccessLayer.Close(); } catch { } return(list); }
public bool ValidarUsuario(string usuario, string clave) { bool bres = false; DataAccessLayerBaseClass dal = DataAccessLayerFactory.GetDataAccessLayer(); IDataParameter[] opar = new IDataParameter[4]; //string claveTemporal = Data.Comunicacion.DCifrar.DescifrarCadena(clave); //claveTemporal = Data.Comunicacion.DCifrar.DescifrarCadena(claveTemporal); string claveTemporal = clave; try { opar[0] = dal.CreateParameter("pCodigo", ParameterDirection.Output, null, DbType.Int32, null, 0); opar[1] = dal.CreateParameter("pMensaje", ParameterDirection.Output, null, DbType.String, null, 500); //opar[2] = dal.CreateParameter("pUsuario", ParameterDirection.Input, usuario, DbType.String, "", 0); opar[2] = dal.CreateParameter("pUsuario", ParameterDirection.Input, int.Parse(usuario), DbType.Int32, "", 0); string ClaveTmp = Cifrar.Seguridad.Cifrado.CifrarAESaBase64(claveTemporal); opar[3] = dal.CreateParameter("pClave", ParameterDirection.Input , Cifrar.Seguridad.Cifrado.CifrarAESaBase64(claveTemporal) , DbType.String, "", 0); //opar[3] = dal.CreateParameter("pClave", ParameterDirection.Input, int.Parse(claveTemporal), DbType.Int32, "", 0); int re = dal.ExecuteQuery("Movil.sprEsUsuarioValido", CommandType.StoredProcedure, opar); if (opar[0].Value.ToString() == "0") { bres = true; } } catch (Exception ex) { Logger.ErrorLog.RegErrorDB(Logger.NivelDeError.Cinco, "200", this.ToString(), string.Empty, ex.StackTrace); } return(bres); }
public BusinessLayer() { DataAccessLayerFactory factory = DataAccessLayerFactory.Instance; DataAccessLayer = factory.CreateDataAccessLayer(false); }
private void method_1(int int_1, ColumnAttribute columnAttribute_0, string string_0, string string_1, object object_0, string string_2, double double_0, double double_1) { int num; if (int_1 < 0) { for (num = 0; num < this.gridColumn_0.Length; num++) { if (this.gridColumn_0[num].FieldName.ToUpper() == string_2.ToUpper()) { int_1 = num; } } } switch (columnAttribute_0) { case ColumnAttribute.CA_LOOKUPEDIT: { RepositoryItemLookUpEdit edit2 = new RepositoryItemLookUpEdit(); if (object_0 is DataTable) { edit2.DataSource = object_0; edit2.DisplayMember = string_1; edit2.ValueMember = string_0; } this.gridColumn_0[int_1].ColumnEdit = edit2; break; } case ColumnAttribute.CA_COMBOBOX: { RepositoryItemComboBox box = new RepositoryItemComboBox(); for (num = 0; num < ((IList)object_0).Count; num++) { box.Items.Add(((IList)object_0)[num].ToString()); } this.gridColumn_0[int_1].ColumnEdit = box; break; } case ColumnAttribute.CA_CHECKEDIT: this.gridColumn_0[int_1].ColumnEdit = new RepositoryItemCheckEdit(); break; case ColumnAttribute.CA_SPINEDIT: this.gridColumn_0[int_1].ColumnEdit = new RepositoryItemSpinEdit(); ((RepositoryItemSpinEdit)((GridView)this.xGrid.MainView).Columns[int_1].ColumnEdit).MaxValue = (decimal)double_1; ((RepositoryItemSpinEdit)((GridView)this.xGrid.MainView).Columns[int_1].ColumnEdit).MinValue = (decimal)double_0; break; case ColumnAttribute.CA_TIMEEDIT: this.gridColumn_0[int_1].ColumnEdit = new RepositoryItemTimeEdit(); break; case ColumnAttribute.CA_TREEVIEWCOMBOX: { RepositoryItemTreeViewComboBoxEdit edit = new RepositoryItemTreeViewComboBoxEdit(); CodeDomainEx.CodeDomainEx ex = object_0 as CodeDomainEx.CodeDomainEx; DataAccessLayerBaseClass dataAccessLayer = DataAccessLayerFactory.GetDataAccessLayer(DataProviderType.OleDb, ex.ConnectionStr); edit.DataAccessLayerBaseClass = dataAccessLayer; edit.TableName = ex.TableFieldName; edit.CodeFieldName = ex.CodeFieldName; edit.NameFieldName = ex.NameFieldName; edit.ParentIDFieldName = ex.ParentIDFieldName; edit.IDFieldName = ex.IDFieldName; this.gridColumn_0[int_1].ColumnEdit = edit; break; } } }
public override void PostExecute(IServiceProvider serviceProvider) { var UpdateRelatedWorkOrders = new UpdateRelatedWorkOrder(DataAccessLayerFactory.GetWorkOrderDataLayer(), CustomTracingService); UpdateRelatedWorkOrders.UpdateAccountWorkOrders(Entity.Id); }
public override void PostExecute() { var updateEmailLogic = new UpdateEmailLogic(DataAccessLayerFactory.GetEmailDataAccessLayer(), CustomTracingService); updateEmailLogic.UpdateAccountsEmails(Entity.Id); }