예제 #1
0
        private void cbStatus_SelectedValueChanged(object sender, EventArgs e)
        {
            if (Convert.ToInt32(cbStatus.SelectedValue) > 0)
            {
                STATUSTLMKEntity   STATUSTLMKTy = new STATUSTLMKEntity();
                STATUSTLMKProvider STATUSTLMKP  = new STATUSTLMKProvider();
                STATUSTLMKTy = STATUSTLMKP.Read(Convert.ToInt32(cbStatus.SelectedValue));

                if (STATUSTLMKTy != null)
                {
                    //Busca Cor
                    int         _COLORA = Convert.ToInt32(STATUSTLMKTy.COLORA);
                    int         _COLOR  = Convert.ToInt32(STATUSTLMKTy.COLOR);
                    int         _COLORG = Convert.ToInt32(STATUSTLMKTy.COLORG);
                    int         _COLORB = Convert.ToInt32(STATUSTLMKTy.COLORB);
                    Color       TipoCor = Color.FromArgb(_COLORA, _COLOR, _COLORG, _COLORB);
                    ColorDialog cd      = new ColorDialog();
                    cd.Color         = TipoCor;
                    label3.ForeColor = cd.Color;
                    label3.Text      = "Status: " + STATUSTLMKTy.NOME;
                }
            }
            else
            {
                label3.ForeColor = Color.Red;
                label3.Text      = "Status:";
            }
        }
예제 #2
0
        private void PaintGrid()
        {
            try
            {
                int i = 0;
                foreach (LIS_AGENDAVENDEDORTLMKEntity item in LIS_AGENDAVENDEDORTLMKColl)
                {
                    STATUSTLMKEntity   STATUSTLMKTy = new STATUSTLMKEntity();
                    STATUSTLMKProvider STATUSTLMKP  = new STATUSTLMKProvider();
                    STATUSTLMKTy = STATUSTLMKP.Read(Convert.ToInt32(item.IDSTATUSTLMK));

                    //Busca Cor
                    int a = Convert.ToInt32(STATUSTLMKTy.COLORA);
                    int r = Convert.ToInt32(STATUSTLMKTy.COLOR);
                    int g = Convert.ToInt32(STATUSTLMKTy.COLORG);
                    int b = Convert.ToInt32(STATUSTLMKTy.COLORB);

                    DataGriewDados.Rows[i].DefaultCellStyle.ForeColor = Color.FromArgb(a, r, g, b);

                    i++;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Erro PaintGrid()" + ex.Message,
                                ConfigSistema1.Default.NomeEmpresa,
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Error,
                                MessageBoxDefaultButton.Button1);
            }
        }
예제 #3
0
        private void FrmStatus_Load(object sender, EventArgs e)
        {
            CreaterCursor Cr = new CreaterCursor();

            this.Cursor = Cr.CreateCursor(Cr.btmap, 0, 0);

            this.MinimizeBox     = false;
            this.FormBorderStyle = FormBorderStyle.FixedDialog;

            GetAllStatus();
            GetToolStripButtonCadastro();

            if (_IDSTATUSTLMK != -1)
            {
                Entity = STATUSTLMKP.Read(_IDSTATUSTLMK);
            }

            if (!Util.Acessa_Tela(this.Name, FrmLogin._IdNivel))
            {
                this.Close();
            }

            this.Cursor = Cursors.Default;
        }