private void FillDataGeralNaturezaUpdateModify() { if ((_RgNaturezaCollection == null) || (_RgStatusCollection == null)) { _RgNaturezaCollection = OverallRecordProcess.CreateInstance.TaskGetCollectionRgNatureza(); _RgStatusCollection = OverallRecordProcess.CreateInstance.TaskGetCollectionRgStatus(); } _RgRegGeralNatureza = AppStateOverallRecord.RgRegGeralNaturezaModifyProcess; #region ...::: Dados Natureza Geral :::... txtUsuario.Text = _RgRegGeralNatureza.Usuario; txtDtHr.Text = _RgRegGeralNatureza.DataHora != DateTime.Parse("01/01/0001 00:00:00") ? _RgRegGeralNatureza.DataHora.ToString() : string.Empty; #endregion cmBxNatureza.DataSource = _RgNaturezaCollection; cmBxNatureza.ValueMember = "IdNatureza"; cmBxNatureza.DisplayMember = "DescrNatureza"; cmBxNatureza.SelectedValue = _RgRegGeralNatureza.IdNatureza; cmBxStatusNat.DataSource = _RgStatusCollection; cmBxStatusNat.ValueMember = "IdRgStatus"; cmBxStatusNat.DisplayMember = "DescrStatus"; cmBxStatusNat.SelectedValue = _RgRegGeralNatureza.IdStatusNat; }
private void FillDataGeralNaturezaAddModify() { if ((_RgNaturezaCollection == null) || (_RgStatusCollection == null)) { _RgNaturezaCollection = OverallRecordProcess.CreateInstance.TaskGetCollectionRgNatureza(); _RgStatusCollection = OverallRecordProcess.CreateInstance.TaskGetCollectionRgStatus(); } _RgRegGeralNatureza = AppStateOverallRecord.RgRegGeralNaturezaModifyProcess; #region ...::: Dados Natureza Geral :::... txtUsuario.Text = _RgRegGeralNatureza.Usuario; txtDtHr.Text = DateTime.Now.ToString(); #endregion cmBxNatureza.DataSource = _RgNaturezaCollection; cmBxNatureza.ValueMember = "IdNatureza"; cmBxNatureza.DisplayMember = "DescrNatureza"; cmBxStatusNat.DataSource = _RgStatusCollection; cmBxStatusNat.ValueMember = "IdRgStatus"; cmBxStatusNat.DisplayMember = "DescrStatus"; }
public void EliminarRgRegGeralNatureza(RgRegGeralNatureza _RgRegGeralNatureza) { RgRegGeralNatureza _Result = null; _Result = DAO.FindByPrimaryKey(_RgRegGeralNatureza.cod_empr, _RgRegGeralNatureza.cod_rg, _RgRegGeralNatureza.cod_natureza); DAO.Delete(_Result); DAO.UnitOfWork.Commit(); }
public IHttpActionResult Put(RgRegGeralNatureza _RgRegGeralNatureza) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } BO.AlterarRgRegGeralNatureza(_RgRegGeralNatureza); return(Updated(_RgRegGeralNatureza)); }
public IHttpActionResult Post(RgRegGeralNatureza _RgRegGeralNatureza) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } BO.AdicionarRgRegGeralNatureza(_RgRegGeralNatureza); return(Created(_RgRegGeralNatureza)); }
public IHttpActionResult Patch(RgRegGeralNatureza _RgRegGeralNatureza) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } Delta <RgRegGeralNatureza> _Delta = new Delta <RgRegGeralNatureza>(); _Delta.CopyChangedValues(_RgRegGeralNatureza); _Delta.Patch(_RgRegGeralNatureza); return(Updated(_RgRegGeralNatureza)); }
public void AlterarRgRegGeralNatureza(RgRegGeralNatureza _RgRegGeralNatureza) { DAO.Update(_RgRegGeralNatureza); DAO.UnitOfWork.Commit(); }
public void AdicionarRgRegGeralNatureza(RgRegGeralNatureza _RgRegGeralNatureza) { DAO.Insert(_RgRegGeralNatureza); DAO.UnitOfWork.Commit(); }
public RgRegGeralNatureza RecuperarRgRegGeralNatureza(int _CodEmpr, int _CodRg, int _CodNatureza) { RgRegGeralNatureza _Result = DAO.RecuperarRgRegGeralNatureza(_CodEmpr, _CodRg, _CodNatureza); return(_Result); }
public IHttpActionResult Delete(RgRegGeralNatureza _RgRegGeralNatureza) { BO.EliminarRgRegGeralNatureza(_RgRegGeralNatureza); return(Content(HttpStatusCode.NoContent, "Deleted")); }
public IHttpActionResult Get([FromODataUri] int CodEmpr, [FromODataUri] int CodRg, [FromODataUri] int CodNatureza) { RgRegGeralNatureza _Result = BO.RecuperarRgRegGeralNatureza(CodEmpr, CodRg, CodNatureza); return(Ok(_Result)); }