示例#1
0
 /// <summary>
 /// 构造函数。
 /// </summary>
 /// <param name="codeCategory"></param>
 public ReasonCodeDialog(ReasonCodeCategoryEntity codeCategory)
     : base(StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.ReasonCodeDialog.Title}"))
 {
     InitializeComponent();
     this.categoryKey  = codeCategory.CodeCategoryKey;
     this.categoryType = codeCategory.CodeCategoryType;
 }
示例#2
0
        /// <summary>
        /// 行单击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void gridViewCodeCategory_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
        {
            //修改状态edit
            CtrlState                     = ControlState.Edit;
            _reasonCodeCategory           = new ReasonCodeCategoryEntity(this.gridViewCodeCategory.GetRowCellValue(e.RowHandle, this.gridColumn_CategoryKey).ToString());
            this.txtCategoryName.Text     = this.gridViewCodeCategory.GetRowCellValue(e.RowHandle, this.gridColumn_CategoryName).ToString();
            this.txtDescription.Text      = this.gridViewCodeCategory.GetRowCellValue(e.RowHandle, this.gridColumn_Descriptions).ToString();
            this.lpCategoryType.EditValue = this.gridViewCodeCategory.GetRowCellValue(e.RowHandle, this.gridColumn_CategoryType).ToString();

            _reasonCodeCategory.CodeCategoryName         = this.txtCategoryName.Text;
            _reasonCodeCategory.CodeCategoryType         = this.lpCategoryType.EditValue.ToString();
            _reasonCodeCategory.CodeCategoryDescriptions = this.txtDescription.Text;
            _reasonCodeCategory.ResetDirtyList();
        }
示例#3
0
        /// <summary>
        /// 绑定查询结果。
        /// </summary>
        private void BindQueryResult()
        {
            ReasonCodeCategoryEntity entity = new ReasonCodeCategoryEntity();
            string name = this.txName.Text;
            //S:是报废代码类别 D:是不良代码类别
            string    type     = this._model.QueryType == ReasonCodeCategoryQueryType.Scrap ? "S" : "D";
            DataTable dtParam  = entity.GetReasonCodeCategoryParamTable(name, type);
            DataTable dtReturn = entity.GetReasonCodeCategory(dtParam);

            if (!string.IsNullOrEmpty(entity.ErrorMsg))
            {
                MessageService.ShowError(entity.ErrorMsg);
                return;
            }
            this.gcResult.DataSource = dtReturn;
            this.gcResult.MainView   = this.gvResult;
        }
示例#4
0
 /// <summary>
 /// Tool Bar New Click 工具栏新增按钮单击事件
 /// </summary>
 private void tsbNew_Click(object sender, EventArgs e)
 {
     _reasonCodeCategory = new ReasonCodeCategoryEntity(CommonUtils.GenerateNewKey(0));
     //状态保存为new
     CtrlState = ControlState.New;
 }