Exemplo n.º 1
0
        private void SetMyControls()
        {
            //var Query4Controls = string.Empty;
            //panelControl1.Location = new Point(ClientSize.Width / 2 - panelControl1.Size.Width / 2, ClientSize.Height / 2 - panelControl1.Size.Height / 2);
            ProjectFunctions.XtraFormVisualize(this);
            ProjectFunctions.ToolStripVisualize(Menu_ToolStrip);
            //ProjectFunctions.GroupCtrlVisualize(panelControl1);


            //ProjectFunctions.DatePickerVisualize(panelControl1);
            //ProjectFunctions.TextBoxVisualize(panelControl1);
            //ProjectFunctions.ButtonVisualize(panelControl1);
            //Query4Controls = String.Format("SELECT     ProgAdd_F, ProgUpd_F, ProgDel_F, ProgRep_p, ProgRep_p,ProgSpl_U FROM         UserProgAccess WHERE     (ProgActive is Null or progActive= 'Y') AND (ProgCode = N'" + GlobalVariables.ProgCode + "') AND (UserName = N'{0}'); ", GlobalVariables.CurrentUser);

            MainFormButtons.Roles(GlobalVariables.ProgCode, GlobalVariables.CurrentUser,
                                  btnAdd, btnEdit, btnDelete, btnPrint);
            //using (var Tempds = ProjectFunctions.GetDataSet(Query4Controls))
            //{
            //    if (Tempds != null)
            //    {
            //        if (Tempds.Tables[0].Rows.Count > 0)
            //        {
            //            if (Tempds.Tables[0].Rows[0]["ProgAdd_F"].ToString() == "-1")
            //            {
            //                btnAdd.Enabled = true;
            //            }
            //            else
            //            {
            //                btnAdd.Enabled = false;
            //            }
            //            if (Tempds.Tables[0].Rows[0]["ProgUpd_F"].ToString() == "-1")
            //            {
            //                btnEdit.Enabled = true;
            //            }
            //            else
            //            {
            //                btnEdit.Enabled = false;
            //            }
            //            if (Tempds.Tables[0].Rows[0]["ProgDel_F"].ToString() == "-1")
            //            {
            //                btnDelete.Enabled = true;
            //            }
            //            else
            //            {
            //                btnDelete.Enabled = false;
            //            }
            //            if (Tempds.Tables[0].Rows[0]["ProgRep_p"].ToString() == "-1")
            //            {
            //                btnPrint.Enabled = true;
            //            }
            //            else
            //            {
            //                btnPrint.Enabled = false;
            //            }
            //        }
            //    }
            //}
        }
Exemplo n.º 2
0
        private void SetMyControls()
        {
            gridView_SalaryProcess.CustomColumnDisplayText += GridView_SalaryProcess_CustomColumnDisplayText;


            ProjectFunctions.ToolStripVisualize(Menu_ToolStrip);

            ProjectFunctions.XtraFormVisualize(this);


            DtStartDate.EditValue = DateTime.Now;

            MainFormButtons.Roles(GlobalVariables.ProgCode, GlobalVariables.CurrentUser, btnAdd);
        }
        private void SetMyControls()
        {
            //panelControl1.Location = new Point(ClientSize.Width / 2 - panelControl1.Size.Width / 2, ClientSize.Height / 2 - panelControl1.Size.Height / 2);
            ProjectFunctions.TextBoxVisualize(this);
            ProjectFunctions.DatePickerVisualize(this);
            ProjectFunctions.ToolStripVisualize(Menu_ToolStrip);
            ProjectFunctions.TextBoxVisualize(this);
            ProjectFunctions.ButtonVisualize(this);
            //ProjectFunctions.GroupCtrlVisualize(panelControl1);
            ProjectFunctions.XtraFormVisualize(this);

            ProjectFunctions.GirdViewVisualize(EmployeeGridView);

            MainFormButtons.Roles(GlobalVariables.ProgCode, GlobalVariables.CurrentUser, btnAdd, btnEdit);

            /*
             * var Query4Controls = String.Format("SELECT     ProgAdd_F, ProgUpd_F, ProgDel_F, ProgRep_p, ReportHardcopy,ProgData_Up  FROM         UserProgAccess  WHERE     (ProgActive = 'Y') AND (ProgCode = N'" + GlobalVariables.ProgCode + "') AND (UserName = N'{0}'); ", GlobalVariables.CurrentUser);
             * using (var Tempds = ProjectFunctions.GetDataSet(Query4Controls))
             * {
             *  if (Tempds != null)
             *  {
             *      if (Tempds.Tables[0].Rows.Count > 0)
             *      {
             *          if (Tempds.Tables[0].Rows[0]["ProgAdd_F"].ToString().Trim() == "-1")
             *          {
             *              btnAdd.Enabled = true;
             *          }
             *          else
             *          {
             *              btnAdd.Enabled = false;
             *          }
             *          if (Tempds.Tables[0].Rows[0]["ProgUpd_F"].ToString().Trim() == "-1")
             *          {
             *              btnEdit.Enabled = true;
             *          }
             *          else
             *          {
             *              btnEdit.Enabled = false;
             *          }
             *      }
             *  }
             * }
             */
        }