Example #1
0
        //Double Click
        private void dgvJustifications_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int index            = dgvJustifications.CurrentCell.RowIndex;
            CatBusinessUnits obj = dgvJustifications.Rows[index].DataBoundItem as CatBusinessUnits;

            IDBusinessUnit = obj.IDBusinessUnits.ToString();
        }
Example #2
0
        public List <CatBusinessUnits> GetBusinessUnits(int OrgId, string connectionName)
        {
            Database  db        = DatabaseFactory.CreateDatabase(connectionName);
            DbCommand dbcommand = db.GetStoredProcCommand(Resources.CatBusinessUnitsResources.SP_GetBusinessUnits);

            db.AddInParameter(dbcommand, Resources.CatBusinessUnitsResources.PARAM_ORG_ID, DbType.Int32, OrgId);
            //Este StoredProcedure no lleva parametros
            //Lista de parametros

            List <CatBusinessUnits> GetBusinessUnitsList = new List <CatBusinessUnits>();

            using (IDataReader dr = db.ExecuteReader(dbcommand))
            {
                int _idbusinessunits = dr.GetOrdinal(Resources.CatBusinessUnitsResources._IDBUSINESSUNITS);
                int _name            = dr.GetOrdinal(Resources.CatBusinessUnitsResources.PARAM_NAME);
                int _idintegra       = dr.GetOrdinal(Resources.CatBusinessUnitsResources.PARAM_ID_INTEGRA);
                //int _pcc = dr.GetOrdinal(Resources.CatBusinessUnitsResources.PARAM_PCC);

                while (dr.Read())
                {
                    CatBusinessUnits item = new CatBusinessUnits();
                    item.IDBusinessUnits = (dr[_idbusinessunits] == DBNull.Value) ? Types.StringNullValue : dr.GetString(_idbusinessunits);
                    item.Name            = (dr[_name] == DBNull.Value) ? Types.StringNullValue : dr.GetString(_name);
                    item.IDIntegra       = (dr[_idintegra] == DBNull.Value) ? Types.StringNullValue : dr.GetString(_idintegra);
                    GetBusinessUnitsList.Add(item);
                }
            }
            return(GetBusinessUnitsList);
        }
Example #3
0
        //Button Accept
        private void btnAccept_Click(object sender, EventArgs e)
        {
            string send = Resources.TicketEmission.Constants.COMMANDS_FIVE_DOT_OV_INDENT;

            IDBusinessUnit = string.Empty;
            BusinessUnit   = string.Empty;
            origin         = string.Empty;

            int index            = dgvJustifications.CurrentCell.RowIndex;
            CatBusinessUnits obj = dgvJustifications.Rows[index].DataBoundItem as CatBusinessUnits;

            IDBusinessUnit = obj.IDBusinessUnits.ToString();

            BusinessUnit = Resources.TicketEmission.Constants.COMMANDS_FIVE_DOT_UN_INDENT + IDBusinessUnit; //+


            if (rdoEnterpricePolicy.Checked)
            {
                send = string.Concat(send, Resources.TicketEmission.Constants.COMMANDS_POLEM);
            }
            if (rdoTouristBulletin.Checked)
            {
                send = string.Concat(send, Resources.TicketEmission.Constants.COMMANDS_BOLETIN);
            }
            if (rdoEmail.Checked)
            {
                send = string.Concat(send, Resources.TicketEmission.Constants.COMMANDS_CORREO);
            }
            if (rdoCustomerRecommendation.Checked)
            {
                send = string.Concat(send, Resources.TicketEmission.Constants.COMMANDS_RECO);
            }
            if (rdoHumanResources.Checked)
            {
                send = string.Concat(send, Resources.TicketEmission.Constants.COMMANDS_RH);
            }
            origin = send;

            Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCPRESENT_RECORD);
        }