示例#1
0
        private void CargaProgramProductionDevelopment()
        {
            List <ProgramProductionDevelopmentBE> lstTmpProgramProductionDevelopment = null;

            lstTmpProgramProductionDevelopment = new ProgramProductionDevelopmentBL().ListaTodosActivo(IdProgramProduction, IdProgramProductionDetail);

            foreach (ProgramProductionDevelopmentBE item in lstTmpProgramProductionDevelopment)
            {
                CProgramProductionDevelopment objE_ProgramProductionDevelopment = new CProgramProductionDevelopment();
                objE_ProgramProductionDevelopment.IdCompany                      = item.IdCompany;
                objE_ProgramProductionDevelopment.IdProgramProduction            = item.IdProgramProduction;
                objE_ProgramProductionDevelopment.IdProgramProductionDetail      = item.IdProgramProductionDetail;
                objE_ProgramProductionDevelopment.IdProgramProductionDevelopment = item.IdProgramProductionDevelopment;
                objE_ProgramProductionDevelopment.DevDate     = item.DevDate;
                objE_ProgramProductionDevelopment.Comment     = item.Comment;
                objE_ProgramProductionDevelopment.IdSituation = item.IdSituation;
                objE_ProgramProductionDevelopment.Situation   = item.Situation;
                objE_ProgramProductionDevelopment.TipoOper    = item.TipoOper;
                mListaProgramProductionDevelopmentOrigen.Add(objE_ProgramProductionDevelopment);
            }

            bsListadoProgramProductionDevelopment.DataSource = mListaProgramProductionDevelopmentOrigen;
            gcProgramProductionDevelopment.DataSource        = bsListadoProgramProductionDevelopment;
            gcProgramProductionDevelopment.RefreshDataSource();
        }
示例#2
0
        private void eliminarProgramProductionDevelopmentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                int IdProgramProductionDevelopment = 0;
                if (gvProgramProductionDevelopment.GetFocusedRowCellValue("IdProgramProductionDevelopment") != null)
                {
                    IdProgramProductionDevelopment = int.Parse(gvProgramProductionDevelopment.GetFocusedRowCellValue("IdProgramProductionDevelopment").ToString());
                }
                ProgramProductionDevelopmentBE objBE_ProgramProductionDevelopment = new ProgramProductionDevelopmentBE();
                objBE_ProgramProductionDevelopment.IdProgramProductionDevelopment = IdProgramProductionDevelopment;
                objBE_ProgramProductionDevelopment.IdCompany = Parametros.intEmpresaId;
                objBE_ProgramProductionDevelopment.Login     = Parametros.strUsuarioLogin;
                objBE_ProgramProductionDevelopment.Machine   = WindowsIdentity.GetCurrent().Name.ToString();

                ProgramProductionDevelopmentBL objBL_ProgramProductionDevelopment = new ProgramProductionDevelopmentBL();
                objBL_ProgramProductionDevelopment.Elimina(objBE_ProgramProductionDevelopment);
                gvProgramProductionDevelopment.DeleteRow(gvProgramProductionDevelopment.FocusedRowHandle);
                gvProgramProductionDevelopment.RefreshData();
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
示例#3
0
        private void btnGrabar_Click(object sender, EventArgs e)
        {
            try
            {
                Cursor = Cursors.WaitCursor;
                if (!ValidarIngreso())
                {
                    ProgramProductionDevelopmentBL objBL_ProgramProductionDevelopment = new ProgramProductionDevelopmentBL();


                    //DETAIL
                    List <ProgramProductionDevelopmentBE> lstProgramProductionDevelopment = new List <ProgramProductionDevelopmentBE>();

                    foreach (var item in mListaProgramProductionDevelopmentOrigen)
                    {
                        ProgramProductionDevelopmentBE objE_ProgramProductionDevelopment = new ProgramProductionDevelopmentBE();
                        objE_ProgramProductionDevelopment.IdCompany                      = Parametros.intEmpresaId;
                        objE_ProgramProductionDevelopment.IdProgramProduction            = IdProgramProduction;
                        objE_ProgramProductionDevelopment.IdProgramProductionDetail      = item.IdProgramProductionDetail;
                        objE_ProgramProductionDevelopment.IdProgramProductionDevelopment = item.IdProgramProductionDevelopment;
                        objE_ProgramProductionDevelopment.DevDate     = item.DevDate;
                        objE_ProgramProductionDevelopment.Comment     = item.Comment;
                        objE_ProgramProductionDevelopment.IdSituation = item.IdSituation;
                        objE_ProgramProductionDevelopment.FlagState   = true;
                        objE_ProgramProductionDevelopment.Login       = Parametros.strUsuarioLogin;
                        objE_ProgramProductionDevelopment.Machine     = WindowsIdentity.GetCurrent().Name.ToString();
                        objE_ProgramProductionDevelopment.TipoOper    = item.TipoOper;
                        lstProgramProductionDevelopment.Add(objE_ProgramProductionDevelopment);
                    }

                    objBL_ProgramProductionDevelopment.Actualiza(lstProgramProductionDevelopment);

                    Application.DoEvents();

                    this.Close();
                }
            }
            catch (Exception ex)
            {
                Cursor = Cursors.Default;
                XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }