/// <summary>
 /// Initialize a new instance of the DataGridViewStyles class.
 /// </summary>
 /// <param name="dataGridView">Reference to owning control.</param>
 public DataGridViewStyles(KryptonDataGridView dataGridView)
 {
     Debug.Assert(dataGridView != null);
     _dataGridView    = dataGridView;
     _gridStyle       = DataGridViewStyle.List;
     _columnStyle     = GridStyle.List;
     _rowStyle        = GridStyle.List;
     _dataCellStyle   = GridStyle.List;
     _backgroundStyle = PaletteBackStyle.GridBackgroundList;
 }
 /// <summary>
 /// Initialize a new instance of the DataGridViewStyles class.
 /// </summary>
 /// <param name="dataGridView">Reference to owning control.</param>
 public DataGridViewStyles(KryptonDataGridView dataGridView)
 {
     Debug.Assert(dataGridView != null);
     _dataGridView = dataGridView;
     _gridStyle = DataGridViewStyle.List;
     _columnStyle = GridStyle.List;
     _rowStyle = GridStyle.List;
     _dataCellStyle = GridStyle.List;
     _backgroundStyle = PaletteBackStyle.GridBackgroundList;
 }
Exemple #3
0
        private void UCRoleView_Load(object sender, EventArgs e)
        {
            // base.RoleButtonStstus(uc.Name);//角色按钮权限-是否隐藏
            //base.SetBtnStatus(wStatus);
            DataSources.BindComBoxDataEnum(cbostate, typeof(DataSources.EnumStatus), true);             //绑定状态 启用 停用
            DataSources.BindComBoxDataEnum(cbodata_sources, typeof(DataSources.EnumDataSources), true); //数据来源 自建 宇通

            DataTable dt = DBHelper.GetTable("查询角色", "v_role", "*", "role_id='" + id + "'", "", "");

            if (dt.Rows.Count <= 0)
            {
                MessageBoxEx.Show("查询角色失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            lblRole_code.Text = dt.Rows[0]["role_code"].ToString();
            lblRole_name.Text = dt.Rows[0]["Role_name"].ToString();
            lblremark.Text    = dt.Rows[0]["remark"].ToString();

            lblcreate_by.Text             = dt.Rows[0]["create_Username"].ToString();
            lblcreate_time.Text           = Common.UtcLongToLocalDateTime(Convert.ToInt64(dt.Rows[0]["create_time"].ToString())).ToString();
            lblupdate_by.Text             = dt.Rows[0]["update_username"].ToString();
            lblupdate_time.Text           = Common.UtcLongToLocalDateTime(Convert.ToInt64(dt.Rows[0]["update_time"].ToString())).ToString();
            cbostate.SelectedValue        = dt.Rows[0]["state"].ToString();
            cbodata_sources.SelectedValue = dt.Rows[0]["data_sources"].ToString();

            string strSql = "select u.user_id,u.user_code,u.user_name,u.user_phone,u.com_name,u.org_id,u.remark,  u.org_name from v_User u ,tr_user_role ur,sys_role r "
                            + " where u.user_id=ur.user_id and r.role_id=ur.role_id and r.enable_flag='1' and  r.role_id='" + id + "' ";

            SYSModel.SQLObj sqlobj = new SYSModel.SQLObj();
            sqlobj.cmdType   = CommandType.Text;
            sqlobj.Param     = new Dictionary <string, SYSModel.ParamObj>();
            sqlobj.sqlString = strSql;
            DataSet ds = DBHelper.GetDataSet("查询用户角色关系", sqlobj);

            //dgvUser.DataSource = ds.Tables[0].DefaultView;
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    DataGridViewRow gvr = dgvUser.Rows[dgvUser.Rows.Add()];
                    gvr.Cells["user_id"].Value    = dr["user_id"];
                    gvr.Cells["user_code"].Value  = dr["user_code"];
                    gvr.Cells["user_name"].Value  = dr["user_name"];
                    gvr.Cells["com_name"].Value   = dr["com_name"];
                    gvr.Cells["org_name"].Value   = dr["org_name"];
                    gvr.Cells["user_phone"].Value = dr["user_phone"];
                    gvr.Cells["remark"].Value     = dr["remark"];
                }
            }
            bindTree();
            GetRoleFun("CL_ROOT");
            DataGridViewStyle.DataGridViewBgColor(dgvFunction);
            DataGridViewStyle.DataGridViewBgColor(dgvUser);
            SetSysBtnView();
        }
Exemple #4
0
        public FrmNewBook()
        {
            InitializeComponent();

            #region 初始化
            this.dgvBookList.AutoGenerateColumns = false;
            this.txtAddCount.Enabled             = false;
            this.btnSave.Enabled = false;
            this.txtBarCode.Focus();
            DataGridViewStyle.DgvStyle1(this.dgvBookList);
            #endregion
        }
        public UCOrganizationManager()
        {
            InitializeComponent();
            DataGridViewStyle.DataGridViewBgColor(dgvorganization);

            this.uiHandler -= new UiHandler(this.ShowBindData);
            this.uiHandler += new UiHandler(this.ShowBindData);

            base.AddEvent    += new ClickHandler(UCOrganizationManager_AddEvent);
            base.CopyEvent   += new ClickHandler(UCOrganizationManager_CopyEvent);
            base.EditEvent   += new ClickHandler(UCOrganizationManager_EditEvent);
            base.DeleteEvent += new ClickHandler(UCOrganizationManager_DeleteEvent);
        }
Exemple #6
0
        public FrmLogQuery()
        {
            InitializeComponent();
            this.dgvLogs.AutoGenerateColumns = false;
            this.cbbPageSize.SelectedIndex   = 0;//默认显示5条数据

            this.btnFirst.Enabled    = false;
            this.btnPrevious.Enabled = false;
            this.btnNext.Enabled     = false;
            this.btnLast.Enabled     = false;
            this.btnGoTo.Enabled     = false;
            DataGridViewStyle.DgvStyle1(this.dgvLogs);
        }
Exemple #7
0
        public FrmIOVarManage()
        {
            InitializeComponent();

            //从xml文件读取出变量对象集合
            listVar = XMLService.GetLIstVar();
            //从xml文件读取出报警变量对象集合
            listVarAlarm = XMLService.GetListVarAlarm();

            DataGridViewStyle.DoubleBuffered(this.dgvVar, true);
            this.dgvVar.AutoGenerateColumns = false;
            //更新dgv
            this.UpdatedgvVar();
        }
Exemple #8
0
        public FrmInventoryManage()
        {
            InitializeComponent();

            List <ProductCategory> list = productManager.GetProductCategory();

            list.Insert(0, new ProductCategory()
            {
                CategoryId = -1, CategoryName = ""
            });
            this.cboCategory.DataSource    = list;
            this.cboCategory.DisplayMember = "CategoryName";
            this.cboCategory.ValueMember   = "CategoryId";

            this.dgvProduct.AutoGenerateColumns = false;
            QueryWarningInfo();
            DataGridViewStyle.DgvStyle1(this.dgvProduct);
        }
        public FrmAddBook()
        {
            InitializeComponent();

            #region 数据初始化
            this.cboBookCategory.DataSource    = bookManager.GetAllCategory();
            this.cboBookCategory.DisplayMember = "CategoryName";
            this.cboBookCategory.ValueMember   = "CategoryId";
            this.cboBookCategory.SelectedIndex = -1; //默认不选中
            this.cboPublisher.DataSource       = bookManager.GetAllPublisher();
            this.cboPublisher.DisplayMember    = "PublisherName";
            this.cboPublisher.ValueMember      = "PublisherId";
            this.cboPublisher.SelectedIndex    = -1; //默认不选中
            //禁用拍照
            this.btnTake.Enabled                 = false;
            this.btnCloseVideo.Enabled           = false;
            this.dgvBookList.AutoGenerateColumns = false;
            DataGridViewStyle.DgvStyle1(this.dgvBookList);
            #endregion
        }
Exemple #10
0
        public FrmDetectionAuto()
        {
            InitializeComponent();

            //创建该窗体时,有可能未选择产品型号
            lblTitle.Text = Program.currentProductType + "空调总成生产线";
            listParam     = XMLService.GetParamsByType(Program.currentProductType);

            DataGridViewStyle.DoubleBuffered(dgvParam, true);
            dgvParam.AutoGenerateColumns = false;

            if (listParam != null)
            {
                UpdateDgvParam(GetDetectedListParam(listParam));
            }

            //初始化定时器
            timerCheckComm.Interval = 5000; //每5s
            timerCheckComm.Enabled  = true; //启动
        }
        private FrmParamSet()
        {
            InitializeComponent();

            //初始化型号下拉框
            cboType.Items.Add("D01");
            cboType.Items.Add("D02");
            cboType.Items.Add("D03");
            cboType.SelectedIndex = 0;

            //设置dgv
            DataGridViewStyle.DoubleBuffered(this.dgvParamSet, true);
            this.dgvParamSet.AutoGenerateColumns = false;

            //根据当前型号,读取显示参数列表
            if (Program.currentProductType != null)
            {
                selectedType = Program.currentProductType;
                listParam    = XMLService.GetParamsByType(Program.currentProductType);
                UpdateDgvParamSet();
            }
        }
Exemple #12
0
 /// <summary>
 /// dgv添加行号
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvDrawingPlan_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     DataGridViewStyle.DgvRowPostPaint(this.dgvDrawingPlan, e);
     if (e.RowIndex > -1)
     {
         int remainingDays = (int)this.dgvDrawingPlan.Rows[e.RowIndex].Cells["RemainingDays"].Value;
         if (remainingDays != 0)
         {
             return;
         }
         DateTime drReleaseActual = (DateTime)this.dgvDrawingPlan.Rows[e.RowIndex].Cells["DrReleaseActual"].Value;
         DateTime drReleaseTarget = (DateTime)this.dgvDrawingPlan.Rows[e.RowIndex].Cells["DrReleaseTarget"].Value;
         if (drReleaseActual.ToString("MM/dd/yyyy") == "01/01/0001")
         {
             dgvDrawingPlan.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.FromArgb(255, 182, 193);
         }
         if (DateTime.Compare(drReleaseActual, drReleaseTarget) > 0)
         {
             dgvDrawingPlan.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.FromArgb(255, 255, 0);
         }
     }
 }
Exemple #13
0
 /// <summary>
 /// 添加行号
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvCustomers_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     DataGridViewStyle.DgvRowPostPaint(this.dgvCustomers, e);
 }
Exemple #14
0
 private void DgvProduct_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     DataGridViewStyle.DgvRowPostPaint(this.dgvProduct, e);
 }
Exemple #15
0
 /// <summary>
 /// 显示行号
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvSpecialRequirements_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     DataGridViewStyle.DgvRowPostPaint(this.dgvSpecialRequirements, e);
 }
Exemple #16
0
 /// <summary>
 /// 添加行号
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvDesignWorkload_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     DataGridViewStyle.DgvRowPostPaint(this.dgvDesignWorkload, e);
 }
Exemple #17
0
 private void dgvDXFCutListFromExcel_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     DataGridViewStyle.DgvRowPostPaint(this.dgvDXFCutListFromExcel, e);
 }
Exemple #18
0
 private void dgvQuickBrowse_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     DataGridViewStyle.DgvRowPostPaint(this.dgvQuickBrowse, e);
 }
Exemple #19
0
 //添加行号
 private void dgvBookList_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     new DataGridViewStyle().DgvStyle1(this.dgvBookList);
     DataGridViewStyle.DgvRowPostPaint(this.dgvBookList, e);
 }
Exemple #20
0
 private void ResetStyle()
 {
     Style = DataGridViewStyle.List;
 }
 private void dgvProjectTypes_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     DataGridViewStyle.DgvRowPostPaint(this.dgvProjectTypes, e);
 }
 /// <summary>
 /// 添加行号
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvExecList_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     DataGridViewStyle.DgvRowPostPaint(this.dgvExecList, e);
 }
 private void CeilingPackingList_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     DataGridViewStyle.DgvRowPostPaint(this.dgvCeilingPackingList, e);
 }
 /// <summary>
 /// 添加行号
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvCeilingAccessories_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     DataGridViewStyle.DgvRowPostPaint(this.dgvCeilingAccessories, e);
 }
Exemple #25
0
 /// <summary>
 /// dgv添加行号
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvCategory_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
 {
     DataGridViewStyle.DgvRowPostPaint(dgvCategory, e);
 }