private void BindGrid()
        {
            try
            {
                IPersonal personal = PersonalFactory.GetPersonalFactory();
                AdministrarGrillas.Configurar(dtgPersonal, "PersonalID", CantidadOpciones, true, false);
                dtgPersonal.CurrentPageIndex = Utiles.Validaciones.obtieneEntero(txtPagina.Text);
                personal.Apellido            = txtApellido.Text;
                personal.Nombre = txtNombre.Text;
                personal.Legajo = txtLegajo.Text;
                if (Categoria1.Descripcion != "")
                {
                    personal.Categoria.CategoriaID = Utiles.Validaciones.obtieneEntero(Categoria1.CategoriaID);
                }
                else
                {
                    personal.Categoria.CategoriaID = 0;
                }

                dtgPersonal.DataSource = personal.GetPersonal().Datos;
                dtgPersonal.DataBind();
            }
            catch (Exception ex)
            {
                ((ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message);
            }
        }
 private void butGuardar_Click(object sender, System.EventArgs e)
 {
     try
     {
         BindGrid();
         IPersonal  personal = PersonalFactory.GetPersonalFactory();
         DsPersonal ds       = (DsPersonal)Session["Personal"];
         foreach (DsPersonal.DatosRow dr in ds.Datos)
         {
             personal.PersonalID = dr.PersonalID;
             if (dr.Asignado)
             {
                 personal.Categoria.CategoriaID = Utiles.Validaciones.obtieneEntero(txtCategoriaID.Text);
             }
             else
             {
                 personal.Categoria.CategoriaID = 0;
             }
             personal.ActualizarCategoria();
         }
     }
     catch (Exception ex)
     {
         ((ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message);
     }
 }
Exemplo n.º 3
0
 private void butGuardar_Click(object sender, System.EventArgs e)
 {
     try
     {
         Domicilio1.ProvinciaID = Utiles.Validaciones.obtieneEntero(txtProvinciaID.Text);
         Page.Validate();
         if (!Page.IsValid)
         {
             return;
         }
         IPersonal personal = PersonalFactory.GetPersonalFactory();
         personal.PersonalID                      = Utiles.Validaciones.obtieneEntero(txtPersonalID.Text);
         personal.Legajo                          = txtLegajo.Text;
         personal.Nombre                          = txtNombre.Text;
         personal.Apellido                        = txtApellido.Text;
         personal.Categoria.CategoriaID           = Utiles.Validaciones.obtieneEntero(Categoria1.CategoriaID);
         personal.EstadoPersonalID                = Utiles.Validaciones.obtieneEntero(ddlEstado.SelectedValue);
         personal.User.UsuarioID                  = Utiles.Validaciones.obtieneEntero(Usuario1.UsuarioID);
         personal.Domicilio.DomicilioID           = Domicilio1.DomicilioID;
         personal.Domicilio.Calle                 = Domicilio1.Calle;
         personal.Domicilio.CalleNro              = Domicilio1.CalleNro;
         personal.Domicilio.Localidad.LocalidadID = Domicilio1.LocalidadID;
         personal.Domicilio.Telefono              = Domicilio1.Telefono;
         personal.Domicilio.Fax                   = Domicilio1.Fax;
         personal.Domicilio.Depto                 = Domicilio1.Depto;
         personal.Email    = txtEmail.Text;
         personal.Telefono = txtOtroTelefono.Text;
         if (rbtInterno.Checked)
         {
             personal.TipoEjecutivoCuentaID = 1;
         }
         else if (rbtExterno.Checked)
         {
             personal.TipoEjecutivoCuentaID = 2;
         }
         else
         {
             personal.TipoEjecutivoCuentaID = 0;
         }
         personal.UnidadNegocioID = Utiles.Validaciones.obtieneEntero(ddlUnidadNegocio.SelectedValue);
         personal.Guardar();
         if (txtPersonalID.Text == "")
         {
             Response.Redirect("Personal.aspx");
         }
         else
         {
             Response.Redirect("PersonalConsul.aspx");
         }
     }
     catch (Exception ex)
     {
         ((ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message);
     }
 }
Exemplo n.º 4
0
 private void Editar()
 {
     try
     {
         IPersonal personal = PersonalFactory.GetPersonalFactory();
         personal.PersonalID = Utiles.Validaciones.obtieneEntero(txtPersonalID.Text);
         personal.Consultar();
         txtLegajo.Text         = personal.Legajo;
         txtNombre.Text         = personal.Nombre;
         txtApellido.Text       = personal.Apellido;
         Categoria1.CategoriaID = personal.Categoria.CategoriaID.ToString();
         if (Categoria1.CategoriaID != "0")
         {
             Categoria1.Nivel       = personal.Categoria.Nivel.ToString();
             Categoria1.Descripcion = personal.Categoria.Descripcion;
         }
         if (personal.TipoEjecutivoCuentaID == 1)
         {
             rbtInterno.Checked = true;
             tdInterno.Attributes.Add("STYLE", "DISPLAY:inline");
             tdExterno.Attributes.Add("STYLE", "DISPLAY:inline");
         }
         else if (personal.TipoEjecutivoCuentaID == 2)
         {
             rbtExterno.Checked = true;
             tdInterno.Attributes.Add("STYLE", "DISPLAY:inline");
             tdExterno.Attributes.Add("STYLE", "DISPLAY:inline");
         }
         Usuario1.UsuarioID = personal.User.UsuarioID.ToString();
         if (Usuario1.UsuarioID != "0")
         {
             Usuario1.Nombre   = personal.User.Nombre;
             Usuario1.Apellido = personal.User.Apellido;
         }
         Domicilio1.DomicilioID = personal.Domicilio.DomicilioID;
         Domicilio1.Calle       = personal.Domicilio.Calle;
         Domicilio1.CalleNro    = personal.Domicilio.CalleNro;
         Domicilio1.Telefono    = personal.Domicilio.Telefono;
         Domicilio1.ProvinciaID = personal.Domicilio.Localidad.Provincia.ProvinciaID;
         Domicilio1.LocalidadID = personal.Domicilio.Localidad.LocalidadID;
         Domicilio1.Fax         = personal.Domicilio.Fax;
         Domicilio1.Depto       = personal.Domicilio.Depto;
         txtOtroTelefono.Text   = personal.Telefono;
         txtEmail.Text          = personal.Email;
         int indice1 = ddlEstado.Items.IndexOf(ddlEstado.Items.FindByValue(personal.EstadoPersonalID.ToString()));
         ddlEstado.SelectedIndex = indice1;
         int indice2 = ddlUnidadNegocio.Items.IndexOf(ddlUnidadNegocio.Items.FindByValue(personal.UnidadNegocioID.ToString()));
         ddlUnidadNegocio.SelectedIndex = indice2;
     }
     catch (Exception ex)
     {
         ((ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message);
     }
 }
 private void dtgPersonal_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
 {
     try
     {
         IPersonal personal = PersonalFactory.GetPersonalFactory();
         personal.PersonalID = Utiles.Validaciones.obtieneEntero(e.Item.Cells[0].Text);
         personal.Eliminar();
     }
     catch (Exception ex)
     {
         ((ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message);
     }
 }
        static void GetSomeData(IPersonal personal)
        {
            var accessLevelAttribute = (AccessLevelAttribute)Attribute.GetCustomAttribute(personal.GetType(), typeof(AccessLevelAttribute));

            if (accessLevelAttribute.Level > 2)
            {
                Console.WriteLine("Защищенная секция");
            }
            else
            {
                Console.WriteLine("Уровень вашего доступа не позволяет просматривать данную секцию!");
            }
        }
 private void Buscar()
 {
     try
     {
         IPersonal personal = PersonalFactory.GetPersonalFactory();
         //personal.PersonalID = Utiles.Validaciones.obtieneEntero(personalID);
         personal.Nombre = nombre;
         personal.Legajo = legajo;
         personal.TipoEjecutivoCuentaID = Utiles.Validaciones.obtieneEntero(tipo);
         DsPersonal ds = personal.GetPersonalByTipoLegajoNombre();
         if (ds.Datos.Count == 1)
         {
             foreach (DsPersonal.DatosRow dr in ds.Datos)
             {
                 txtTipo.Text       = dr.TipoEjecutivoCuentaID.ToString();
                 txtLegajo.Text     = dr.Legajo;
                 txtNombre.Text     = dr.Apellido + ", " + dr.Nombre;
                 txtPersonalID.Text = dr.PersonalID.ToString();
                 txtErrorMsg.Text   = "";
                 txtOpen.Text       = "";
             }
         }
         else if (ds.Datos.Count > 1)
         {
             txtTipo.Text       = tipo;
             txtLegajo.Text     = legajo;
             txtNombre.Text     = nombre;
             txtPersonalID.Text = "";
             txtOpen.Text       = "S";
         }
         else
         {
             txtTipo.Text       = tipo;
             txtLegajo.Text     = legajo;
             txtNombre.Text     = nombre;
             txtPersonalID.Text = "";
             txtErrorMsg.Text   = "No se encontraron datos";
             txtOpen.Text       = "";
         }
     }
     catch (Exception ex)
     {
         txtErrorMsg.Text = "Error al consultar datos " + ex.Message;
     }
 }
 private void BindGrid()
 {
     try
     {
         IPersonal personal = PersonalFactory.GetPersonalFactory();
         personal.TipoEjecutivoCuentaID = Utiles.Validaciones.obtieneEntero(txtTipo.Text);
         personal.Legajo     = txtLegajo.Text;
         personal.Nombre     = txtNombre.Text;
         personal.PersonalID = 0;
         SisPackController.AdministrarGrillas.Configurar(dtgPersonal, "PersonalID", 10, true, false);
         dtgPersonal.CurrentPageIndex = Utiles.Validaciones.obtieneEntero(txtPagina.Text);
         dtgPersonal.DataSource       = personal.GetPersonalByTipoLegajoNombre().Datos;
         dtgPersonal.DataBind();
     }
     catch (Exception ex)
     {
         ((ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message);
     }
 }
Exemplo n.º 9
0
 private void BindGridClientes()
 {
     try
     {
         IPersonal personal = PersonalFactory.GetPersonalFactory();
         AdministrarGrillas.Configurar(dtgCliente, "EntidadID", CantidadOpciones, true, false);
         DsEjecutivoCtaMasivo ds = new DsEjecutivoCtaMasivo();
         personal.EntidadID             = Utiles.Validaciones.obtieneEntero(Cliente1.ClienteID);
         personal.PersonalID            = Utiles.Validaciones.obtieneEntero(Externo1.PersonalID);
         personal.Categoria.CategoriaID = Utiles.Validaciones.obtieneEntero(ddlCategoriaC.SelectedValue);
         if (personal.EntidadID == 0)
         {
             dtgCliente.Columns[7].Visible = false;
         }
         else
         {
             dtgCliente.Columns[7].Visible = true;
         }
         if (Session["DataSet"] == null)
         {
             ds = personal.GetEntidades(2, Convert.ToDateTime(txtFechaDesde.Text), Convert.ToDateTime(txtFechaHasta.Text));
         }
         else
         {
             ds = (DsEjecutivoCtaMasivo)Session["DataSet"];
             foreach (DataGridItem item in dtgCliente.Items)
             {
                 DsEjecutivoCtaMasivo.DatosRow dr = (DsEjecutivoCtaMasivo.DatosRow)ds.Datos.Rows[item.DataSetIndex];
                 CheckBox chk = (CheckBox)item.FindControl("chkAsignaC");
                 dr.Asignada = chk.Checked;
             }
         }
         Session["DataSet"]          = ds;
         dtgCliente.CurrentPageIndex = Utiles.Validaciones.obtieneEntero(txtPaginaC.Text);
         dtgCliente.DataSource       = ds.Datos;
         dtgCliente.DataBind();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 10
0
 private void BindGrid()
 {
     try
     {
         Page.Validate();
         if (!Page.IsValid)
         {
             return;
         }
         IPersonal personal = PersonalFactory.GetPersonalFactory();
         personal.EntidadID  = Utiles.Validaciones.obtieneEntero(Agencia1.AgenciaID);
         personal.PersonalID = Utiles.Validaciones.obtieneEntero(Interno1.PersonalID);
         AdministrarGrillas.Configurar(dtgReporte, "EntidadID", CantidadOpciones, true, false);
         dtgReporte.CurrentPageIndex = Utiles.Validaciones.obtieneEntero(txtPagina.Text);
         dtgReporte.DataSource       = personal.GetReporte(1, Convert.ToDateTime(txtFechaDesde.Text), Convert.ToDateTime(txtFechaHasta.Text)).Datos;
         dtgReporte.DataBind();
     }
     catch (Exception ex)
     {
         ((ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message);
     }
 }
Exemplo n.º 11
0
        public bool Delete(IPersonal personal)
        {
            string sqlDelete = $@"DELETE FROM Personal WHERE Id='{personal.ID}'";

            return(ExeNonQueryCommand(sqlDelete));
        }
Exemplo n.º 12
0
 public PersonalLogic()
 {
     this._uow          = new UnitOfWork();
     this._personalData = new PersonalData(_uow);
     this._usuarioData  = new UsuarioData(_uow);
 }
Exemplo n.º 13
0
        private string ExportarPDF()
        {
            try
            {
                //DsEjecutivoCtaMasivo ds = new DsEjecutivoCtaMasivo();

                /*
                 * if(Session["DataSet"] != null)
                 *      ds = (DsEjecutivoCtaMasivo)Session["DataSet"];
                 * if(ds.Datos.Count == 0)
                 * {
                 *      Exception ex = new Exception("No existen datos para imprimir");
                 *      throw ex;
                 * }
                 */
                IPersonal personal = PersonalFactory.GetPersonalFactory();
                AdministrarGrillas.Configurar(dtgAgencia, "EntidadID", CantidadOpciones, true, false);
                DsEntidadByEjecutivoImprimir ds = new DsEntidadByEjecutivoImprimir();
                if (rbtInterno.Checked)
                {
                    personal.EntidadID             = Utiles.Validaciones.obtieneEntero(Agencia1.AgenciaID);
                    personal.PersonalID            = Utiles.Validaciones.obtieneEntero(Interno1.PersonalID);
                    personal.Categoria.CategoriaID = Utiles.Validaciones.obtieneEntero(ddlCategoriaA.SelectedValue);
                    ds = personal.GetEntidadesByEjecutivo(1, Convert.ToDateTime(txtFechaDesde.Text), Convert.ToDateTime(txtFechaHasta.Text));
                }
                else
                {
                    personal.EntidadID             = Utiles.Validaciones.obtieneEntero(Cliente1.ClienteID);
                    personal.PersonalID            = Utiles.Validaciones.obtieneEntero(Externo1.PersonalID);
                    personal.Categoria.CategoriaID = Utiles.Validaciones.obtieneEntero(ddlCategoriaC.SelectedValue);
                    ds = personal.GetEntidadesByEjecutivo(2, Convert.ToDateTime(txtFechaDesde.Text), Convert.ToDateTime(txtFechaHasta.Text));
                }

                ReportDocument             oRD = new ReportDocument();
                ExportOptions              oExO;
                DiskFileDestinationOptions oExDo = new DiskFileDestinationOptions();
                string nombArchi  = "Ejecutivos_de_Cuenta.pdf";
                string sNombrePDF = Server.MapPath(".") + "/ReportesPDF/" + nombArchi;
                if (System.IO.File.Exists(sNombrePDF))
                {
                    System.IO.File.Delete(sNombrePDF);
                }
                oRD.Load(Server.MapPath("." + "/Reportes/AsigancionMasivaEjecutivoCuenta.rpt"));
                oRD.SetDataSource(ds);
                oExDo.DiskFileName = sNombrePDF;
                oExO = oRD.ExportOptions;
                oExO.ExportDestinationType = ExportDestinationType.DiskFile;
                oExO.ExportFormatType      = ExportFormatType.PortableDocFormat;
                oExO.DestinationOptions    = oExDo;
                oRD.Export();
                oRD.Close();
                oRD.Dispose();
                return(nombArchi);
            }
            catch (Exception ex)
            {
                string mensaje = "Error al exportar a PDF: " + ex.Message;
                ((ErrorWeb)this.phErrores.Controls[0]).setMensaje(mensaje);
                return("");
            }
        }
Exemplo n.º 14
0
 public PersonalController(IPersonal _objpersonal)
 {
     objpersonal = _objpersonal;
 }
Exemplo n.º 15
0
 public PersonalController(IPersonal _objemployee)
 {
     objemployee = _objemployee;
 }
Exemplo n.º 16
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            this.lblFechaActual.Text = DateTime.Today.ToString("dd/MM/yyyy");
            if (this.Request.QueryString["VendedorID"] != null && this.Request.QueryString["AgenciaID"] == null)
            {
                #region EsVendedor
                IVendedor vendedor = VendedorFactory.GetVendedor();
                vendedor.VendedorID = Convert.ToInt32(this.Request.QueryString["VendedorID"].ToString());
                vendedor.Consultar();
                this.lblTitulo.Text = "Vendedor: " + vendedor.NroLegajo.ToString() + " - " + vendedor.Nombre + " " + vendedor.Apellido;

                if (User.Identity.IsAuthenticated)
                {
                    string sOpcion = "evaluacionObjetivosIncentivosVendedores";
                    Menu   oMenu   = (Menu)this.FindControl("Menu1");
                    this.ValidarSeguridad(oMenu, sOpcion);
                }
                if (!IsPostBack)
                {
                    //this.BindGrillaObjetivosVendedor();
                    //this.BindGrillaIncentivosVendedor();
                    tdObjetivos.Attributes.Add("STYLE", "DISPLAY:none");
                    tdIncentivos.Attributes.Add("STYLE", "DISPLAY:none");
                    LlenarObjetivo();
                    LlenarIncentivo();
                }
                #endregion
            }
            else if (this.Request.QueryString["VendedorID"] == null && this.Request.QueryString["AgenciaID"] != null)
            {
                #region EsAgencia
                IAgencia agencia = AgenciaFactory.GetAgencia();
                agencia.AgenciaID = Convert.ToInt32(this.Request.QueryString["AgenciaID"].ToString());
                agencia.ConsultarBasicoByAgenciaID();
                this.lblTitulo.Text = "Agencia: " + agencia.SucursalDGI.ToString() + " - " + agencia.RazonSocial;

                if (User.Identity.IsAuthenticated)
                {
                    string sOpcion = "evaluacionObjetivosIncentivosAgencias";
                    Menu   oMenu   = (Menu)this.FindControl("Menu1");
                    this.ValidarSeguridad(oMenu, sOpcion);
                }
                if (!IsPostBack)
                {
                    //this.BindGrillaObjetivosAgencia();
                    //this.BindGrillaIncentivosAgencia();
                    tdObjetivos.Attributes.Add("STYLE", "DISPLAY:none");
                    tdIncentivos.Attributes.Add("STYLE", "DISPLAY:none");
                    LlenarObjetivo();
                    LlenarIncentivo();
                }
                #endregion
            }
            else if (Request.QueryString["PersonalID"] != null)
            {
                #region Personal
                IPersonal personal = PersonalFactory.GetPersonalFactory();
                personal.PersonalID = Utiles.Validaciones.obtieneEntero(Request.QueryString["PersonalID"]);
                personal.Consultar();
                lblTitulo.Text = "Personal: " + personal.Nombre + " " + personal.Apellido;

                if (User.Identity.IsAuthenticated)
                {
                    string sOpcion = "evaluacionObjetivosIncentivosPersonal";
                    Menu   oMenu   = (Menu)this.FindControl("Menu1");
                    this.ValidarSeguridad(oMenu, sOpcion);
                }

                if (!IsPostBack)
                {
                    tdObjetivos.Attributes.Add("STYLE", "DISPLAY:none");
                    LlenarObjetivo();
                }
                tdIncentivos.Attributes.Add("STYLE", "DISPLAY:none");
                lblIncentivo.Attributes.Add("STYLE", "DISPLAY:none");
                ddlIncentivo.Attributes.Add("STYLE", "DISPLAY:none");
                #endregion
            }
            SetearValidadores();
        }
Exemplo n.º 17
0
 public Personal()
 {
     dal = DataAccess.CreatePersonal();
 }
Exemplo n.º 18
0
        public bool Insert(IPersonal personal)
        {
            string sqlInsert = $@"INSERT INTO Personal VALUES('{personal.ID}', '{personal.MID}', '{personal.Name}', '{personal.VName}', '{personal.Stunden.ToString()}', '{personal.IstUnterrichtet}')";

            return(ExeNonQueryCommand(sqlInsert));
        }
Exemplo n.º 19
0
 private void butGuardar_Click(object sender, System.EventArgs e)
 {
     try
     {
         IPersonal personal = PersonalFactory.GetPersonalFactory();
         personal.PersonalID = rbtInterno.Checked ? Utiles.Validaciones.obtieneEntero(Interno1.PersonalID) : Utiles.Validaciones.obtieneEntero(Externo1.PersonalID);
         int tipo = rbtInterno.Checked ? 1 : 2;
         if (tipo == 1)
         {
             #region Agencias
             if (Agencia1.AgenciaID != "")
             {
                 foreach (DataGridItem item in dtgAgencia.Items)
                 {
                     personal.EntidadID = Utiles.Validaciones.obtieneEntero(Agencia1.AgenciaID);
                     int personalID = 0;
                     personalID = Utiles.Validaciones.obtieneEntero(((UC.BusqPersonal)item.FindControl("Ejecutivo1")).PersonalID);
                     if (personalID == 0)
                     {
                         DsEjecutivoCtaMasivo          ds = (DsEjecutivoCtaMasivo)Session["DataSet"];
                         DsEjecutivoCtaMasivo.DatosRow dr = (DsEjecutivoCtaMasivo.DatosRow)ds.Datos.Rows[item.DataSetIndex];
                         personalID = dr.IsPersonalIDNull() ? 0 : dr.PersonalID;
                     }
                     if (personalID == 0)
                     {
                         Exception ex = new Exception("No ha asignado ningún ejecutivo de cuentas a la agencia");
                         throw ex;
                     }
                     personal.PersonalID = personalID;
                     personal.GuardarEntidad(tipo);
                 }
             }
             else
             {
                 BindGridAgencias();
                 DsEjecutivoCtaMasivo ds = (DsEjecutivoCtaMasivo)Session["DataSet"];
                 foreach (DsEjecutivoCtaMasivo.DatosRow dr in ds.Datos)
                 {
                     if (dr.Asignada)
                     {
                         personal.PersonalID = Utiles.Validaciones.obtieneEntero(Interno1.PersonalID);
                         personal.EntidadID  = dr.EntidadID;
                         personal.GuardarEntidad(tipo);
                     }
                     else
                     {
                         personal.PersonalID = 0;
                         personal.EntidadID  = dr.EntidadID;
                         personal.GuardarEntidad(tipo);
                     }
                 }
             }
             Session["DataSet"]   = null;
             Agencia1.AgenciaID   = "";
             Agencia1.Sucursal    = "";
             Agencia1.RazonSocial = "";
             txtPagina.Text       = "";
             BindGridAgencias();
             #endregion
         }
         else
         {
             #region Clientes
             if (Cliente1.ClienteID != "")
             {
                 foreach (DataGridItem item in dtgCliente.Items)
                 {
                     personal.EntidadID = Utiles.Validaciones.obtieneEntero(Cliente1.ClienteID);
                     int personalID = 0;
                     personalID = Utiles.Validaciones.obtieneEntero(((UC.BusqPersonal)item.FindControl("Ejecutivo2")).PersonalID);
                     if (personalID == 0)
                     {
                         DsEjecutivoCtaMasivo          ds = (DsEjecutivoCtaMasivo)Session["DataSet"];
                         DsEjecutivoCtaMasivo.DatosRow dr = (DsEjecutivoCtaMasivo.DatosRow)ds.Datos.Rows[item.DataSetIndex];
                         personalID = dr.IsPersonalIDNull() ? 0 : dr.PersonalID;
                     }
                     if (personalID == 0)
                     {
                         Exception ex = new Exception("No ha asignado ningún ejecutivo de cuentas al cliente");
                         throw ex;
                     }
                     personal.PersonalID = personalID;
                     personal.GuardarEntidad(tipo);
                 }
             }
             else
             {
                 BindGridClientes();
                 DsEjecutivoCtaMasivo ds = (DsEjecutivoCtaMasivo)Session["DataSet"];
                 foreach (DsEjecutivoCtaMasivo.DatosRow dr in ds.Datos)
                 {
                     if (dr.Asignada)
                     {
                         personal.PersonalID = Utiles.Validaciones.obtieneEntero(Externo1.PersonalID);
                         personal.EntidadID  = dr.EntidadID;
                         personal.GuardarEntidad(tipo);
                     }
                     else
                     {
                         personal.PersonalID = 0;
                         personal.EntidadID  = dr.EntidadID;
                         personal.GuardarEntidad(tipo);
                     }
                 }
             }
             Session["DataSet"]   = null;
             Cliente1.ClienteID   = "";
             Cliente1.Codigo      = "";
             Cliente1.RazonSocial = "";
             txtPaginaC.Text      = "";
             BindGridClientes();
             #endregion
         }
     }
     catch (Exception ex)
     {
         ((ErrorWeb)phErrores.Controls[0]).setMensaje(ex.Message);
     }
 }
Exemplo n.º 20
0
        public bool Update(IPersonal personal)
        {
            string sqlUpdate = $@"UPDATE Personal SET MId='{personal.MID}', Name='{personal.Name}', VName='{personal.VName}', Stunden='{personal.Stunden.ToString()}', IstUnterrichtet='{personal.IstUnterrichtet}' WHERE Id='{personal.ID}'";

            return(ExeNonQueryCommand(sqlUpdate));
        }