コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AddDefectiveReasonForm_Load(object sender, EventArgs e)
        {
            FormDatatableFromVo();

            if (defectiveCategoryDatatable.Rows.Count > 0)
            {
                ComboBind(DefectiveCategory_cmb, defectiveCategoryDatatable, "name", "id");
            }
            else
            {
                DefectiveCategory_cmb.Enabled = false;
            }


            DefectiveReasonCode_txt.Select();

            if (string.Equals(mode, CommonConstants.MODE_UPDATE))
            {
                LoadUserData(updateData);

                DefectiveReasonCode_txt.Enabled = false;

                DefectiveReasonName_txt.Select();
            }
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AddDefectiveReasonNewForm_Load(object sender, EventArgs e)
        {
            FormDatatableFromVo();

            if (defectiveCategoryDatatable.Rows.Count > 0)
            {
                ComboBind(DefectiveCategory_cmb, defectiveCategoryDatatable, "name", "id");
            }
            else
            {
                DefectiveCategory_cmb.Enabled = false;
            }

            DefectiveReasonCode_txt.Select();
            int defectRsnId = 0;

            if (string.Equals(mode, CommonConstants.MODE_UPDATE))
            {
                LoadUserData(updateData);

                defectRsnId = updateData.DefectiveReasonId;

                DefectiveReasonCode_txt.Enabled = false;

                DefectiveReasonName_txt.Select();
            }
            else
            {
                DefectiveReasonVo outVo = null;
                try
                {
                    outVo = (DefectiveReasonVo)base.InvokeCbm(new GetDefectiveReasonDisplayOrderCbm(), null, false);
                }
                catch (Framework.ApplicationException ex)
                {
                    popUpMessage.ApplicationError(ex.GetMessageData(), this.TitleText);
                }

                if (outVo != null)
                {
                    DisplayOrder_txt.Text = outVo.DisplayOrder.ToString();
                }
                else
                {
                    DisplayOrder_txt.Text = "1";
                }
            }

            BindGrid(defectRsnId);
        }