예제 #1
0
        /// <summary>
        /// BaseEdit 컴포넌트에서 Focus Out 될 때 원래 바탕색으로 변경.
        ///		- Leave Event에서 처리됨.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        static private void OnCommonLeave(object sender, EventArgs e)
        {
            DevExpress.XtraEditors.BaseEdit edt = sender as DevExpress.XtraEditors.BaseEdit;

            if (edt == null)
            {
                return;
            }

            if (edt is CheckEdit || edt is RadioGroup)
            {
                return;
            }

            if (edt.Properties.ReadOnly || edt.Enabled == false)
            {
                return;
            }

            if ("Y".Equals(edt.Tag))
            {
                edt.Properties.Appearance.BackColor = COLOR_CTRL_BK_NEED;
                edt.BackColor = COLOR_CTRL_BK_NEED;
                edt.Properties.Appearance.Options.UseBackColor = true;
            }
            else
            {
                edt.Properties.Appearance.BackColor = COLOR_CTRL_BK_NORMAL;
                edt.BackColor = COLOR_CTRL_BK_NORMAL;
                edt.Properties.Appearance.Options.UseBackColor = false;
            }
        }
예제 #2
0
 private void sonOfNum_EditValueChanged(object sender, EventArgs e)
 {
     DevExpress.XtraEditors.BaseEdit edit = gridView1.ActiveEditor;
     if (edit == null)
     {
         return;
     }
     if (gridView1.FocusedColumn.FieldName.Equals("DEL001"))
     {
         if (edit.EditValue == null)
         {
             return;
         }
         if (string.IsNullOrEmpty(edit.EditValue.ToString( )))
         {
             return;
         }
         DataRow row = tablePNum.Select("DEA001='" + edit.EditValue + "'") [0];
         if (row == null)
         {
             return;
         }
         if (!row ["DEA001"].ToString( ).Equals(edit.EditValue))
         {
             return;
         }
         gridView1.SetFocusedRowCellValue(gridView1.Columns ["DEL002"], row ["DEA002"].ToString( ));
         gridView1.SetFocusedRowCellValue(gridView1.Columns ["DEL003"], row ["DEA057"].ToString( ));
         gridView1.SetFocusedRowCellValue(gridView1.Columns ["DEL004"], row ["DEA003"].ToString( ));
     }
 }
예제 #3
0
        /// <summary>
        /// BaseEdit 컴포넌트에 Focus In 될 때 선택 색상 표시.
        ///		- Enter Event 에서 처리됨.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        static private void OnCommonEnter(object sender, EventArgs e)
        {
            try
            {
                //Basic.ControlColorChange(sender, true);
                DevExpress.XtraEditors.BaseEdit edt = sender as DevExpress.XtraEditors.BaseEdit;
                if (edt != null)
                {
                    // CHECK BOX는 설정하지 않음
                    if (edt is CheckEdit || edt is RadioGroup)
                    {
                        return;
                    }

                    if (edt.Properties.ReadOnly || edt.Enabled == false)
                    {
                        return;
                    }

                    edt.Properties.Appearance.BackColor = COLOR_CTRL_BK_SELECTED;
                    edt.BackColor = COLOR_CTRL_BK_SELECTED;
                    edt.Properties.Appearance.Options.UseBackColor = true;

                    edt.SelectAll();
                }
            }
            catch (Exception ex)
            {
                Basic.ShowMessage(3, ex.Message);
            }
        }
예제 #4
0
 protected void MakeControlsReadOnly(DevExpress.XtraLayout.LayoutControlGroup _LayoutControl, bool value)
 {
     foreach (DevExpress.XtraLayout.LayoutControlItem item in _LayoutControl.Items)
     {
         if (!(item).GetType().Equals(typeof(DevExpress.XtraLayout.EmptySpaceItem)))
         {
             DevExpress.XtraEditors.BaseEdit ctr = (DevExpress.XtraEditors.BaseEdit)item.Control;
             ctr.ReadOnly = value;
         }
     }
 }
예제 #5
0
 private void lupUser_EditValueChanged(object sender, System.EventArgs e)
 {
     DevExpress.XtraEditors.BaseEdit edit = gridView1.ActiveEditor;
     switch (gridView1.FocusedColumn.FieldName)
     {
     case "ARP001":
         string str = tablePerson.Select("ARP001='" + edit.EditValue + "'") [0] ["ARP002"].ToString( );
         gridView1.SetFocusedRowCellValue(gridView1.Columns ["ARP002"], str);
         break;
     }
 }
예제 #6
0
 protected void ClearControls(DevExpress.XtraLayout.LayoutControlGroup _LayouControl)
 {
     foreach (DevExpress.XtraLayout.LayoutControlItem item in _LayouControl.Items)
     {
         if (!item.GetType().Equals(typeof(DevExpress.XtraLayout.EmptySpaceItem)))
         {
             DevExpress.XtraEditors.BaseEdit ctr = (DevExpress.XtraEditors.BaseEdit)item.Control;
             ctr.EditValue = null;
         }
     }
 }
예제 #7
0
 private void secUser_EditValueChanged(object sender, EventArgs e)
 {
     DevExpress.XtraEditors.BaseEdit edit = gridView1.ActiveEditor;
     switch (gridView1.FocusedColumn.FieldName)
     {
     case "WIE011":
         if (edit.EditValue != null)
         {
             gridView1.SetFocusedRowCellValue(gridView1.Columns ["WIE012"], UserInfo.Select("WIE011='" + edit.EditValue.ToString( ) + "'") [0] ["WIE012"].ToString( ));
         }
         break;
     }
 }
예제 #8
0
파일: FormMain.cs 프로젝트: icprog/JinFen
 //行变化
 private void partNum_EditValueChanged(object sender, EventArgs e)
 {
     DevExpress.XtraEditors.BaseEdit edit = gridView1.ActiveEditor;
     if (gridView1.FocusedColumn.FieldName == "MAI002" && edit.EditValue != null)
     {
         rows = partTable.Select("MAI002='" + edit.EditValue + "'") [0];
         gridView1.SetFocusedRowCellValue(gridView1.Columns ["BAS002"], rows ["BAS002"].ToString( ));
         gridView1.SetFocusedRowCellValue(gridView1.Columns ["BAS004"], rows ["BAS004"].ToString( ));
         gridView1.SetFocusedRowCellValue(gridView1.Columns ["BAS005"], rows ["BAS005"].ToString( ));
         gridView1.SetFocusedRowCellValue(gridView1.Columns ["BAS006"], rows ["BAS006"].ToString( ));
         gridView1.SetFocusedRowCellValue(gridView1.Columns ["BAS007"], rows ["BAS007"].ToString( ));
         gridView1.SetFocusedRowCellValue(gridView1.Columns ["BAS008"], rows ["BAS008"].ToString( ));
         gridView1.SetFocusedRowCellValue(gridView1.Columns ["BAS009"], rows ["BAS009"].ToString( ));
     }
 }
예제 #9
0
        private void lupUserInfo_EditValueChanged(object sender, EventArgs e)
        {
            DevExpress.XtraEditors.BaseEdit edit = gridView1.ActiveEditor;
            DataRow row = gridView1.GetFocusedDataRow( );

            if (row != null)
            {
                row = tableView.Rows [gridView1.FocusedRowHandle];
                row.BeginEdit( );
                row ["WIE011"] = edit.EditValue.ToString( );
                row ["WIE012"] = edit.Text;
                row.EndEdit( );
                gridControl1.RefreshDataSource( );
            }
        }
예제 #10
0
 private void secUser_EditValueChanged(object sender, System.EventArgs e)
 {
     DevExpress.XtraEditors.BaseEdit edit = gridView1.ActiveEditor;
     switch (gridView1.FocusedColumn.FieldName)
     {
     case "WIB001":
         if (edit.EditValue != null)
         {
             _model.WIB002 = tableGoods.Select("WIB001='" + edit.EditValue + "'") [0] ["WIB002"].ToString( );
             _model.WIB003 = tableGoods.Select("WIB001='" + edit.EditValue + "'") [0] ["WIB003"].ToString( );
             gridView1.SetFocusedRowCellValue(gridView1.Columns ["WIB002"], _model.WIB002);
             gridView1.SetFocusedRowCellValue(gridView1.Columns ["WIB003"], _model.WIB003);
         }
         break;
     }
 }
예제 #11
0
 private void resArt_EditValueChanged(object sender, System.EventArgs e)
 {
     DevExpress.XtraEditors.BaseEdit edit = gridView1.ActiveEditor;
     switch (gridView1.FocusedColumn.FieldName)
     {
     case "ARP003":
     {
         if (edit.EditValue != null)
         {
             string str = tableArt.Select("idx='" + edit.EditValue + "'") [0] ["ARP004"].ToString( );
             gridView1.SetFocusedRowCellValue(gridView1.Columns ["ARP004"], str);
         }
     }
     break;
     }
 }
예제 #12
0
        /// <summary>
        /// XtraPanel 내에 포함된 모든 DevExpress 컴포넌트에 대해 바탕색 및 선택 색상 지정.
        ///		- BaseEdit 상속 컴포넌트에 대해 지정
        ///		- 단, CheckEdit, RadioGroup 컴포넌트는 제외
        ///		- 컴포넌트의 Tag Property에 "Y" 설정되면 필수 처리, 이외의 경우에는 일반.
        /// </summary>
        /// <param name="container">폼 객체</param>
        static public void SetColorContainerCtrl(XtraPanel container)
        {
            try
            {
                if (container == null)
                {
                    return;
                }
                int len = container.Controls.Count;
                for (int i = 0; i < len; i++)
                {
                    if (container.Controls[i] is RadioGroup)
                    {                           // RODIO도 설정하지 않음. 단, Radio는 TabStop false 설정.
                        (container.Controls[i] as RadioGroup).TabStop = false;
                        continue;
                    }

                    if (container.Controls[i] is DevExpress.XtraEditors.BaseEdit)
                    {
                        // 입력 컨트롤 설정.
                        DevExpress.XtraEditors.BaseEdit edt = container.Controls[i] as DevExpress.XtraEditors.BaseEdit;
                        if (edt != null)
                        {
                            // CHECK BOX는 설정하지 않음
                            if (edt is CheckEdit)
                            {
                                continue;
                            }

                            if (edt.Properties.ReadOnly)
                            {
                                edt.TabStop = false;
                            }

                            ChangeBkColor(edt);
                            edt.Enter += new EventHandler(OnCommonEnter);
                            edt.Leave += new EventHandler(OnCommonLeave);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                string s = ex.Message;
            }
        }
예제 #13
0
        /// <summary>
        /// BaseEdit 컴포넌트의 바탕색 지정(필수, 일반)
        /// </summary>
        /// <param name="sender"></param>
        static public void ChangeBkColor(DevExpress.XtraEditors.BaseEdit sender)
        {
            if (sender.Properties.ReadOnly || sender.Enabled == false)
            {
                return;
            }

            if ("Y".Equals(sender.Tag))
            {
                sender.Properties.Appearance.BackColor = COLOR_CTRL_BK_NEED;
                sender.BackColor = COLOR_CTRL_BK_NEED;
                sender.Properties.Appearance.Options.UseBackColor = true;
            }
            else
            {
                sender.Properties.Appearance.BackColor = Color.White;
                sender.BackColor = Color.White;
                sender.Properties.Appearance.Options.UseBackColor = false;
            }
        }
예제 #14
0
 public override void MainControl_Leave(object sender, EventArgs e)
 {
     if (GetGridStatu() != SingleForm.GridStatu.gsBrowse)
     {
         base.MainControl_Leave(sender, e);
         DevExpress.XtraEditors.BaseEdit edit = (sender as DevExpress.XtraEditors.BaseEdit);
         if (edit.Text.Trim() == "")
         {
             return;
         }
         string[] xADMMJ = null;
         string[] xParam = null;
         Dictionary <DevExpress.XtraEditors.BaseControl, int> xReturnFileds = new Dictionary <DevExpress.XtraEditors.BaseControl, int>();
         if (edit.Name == "XA002")
         {
             xADMMJ = new string[] { "POSXI", "001" };
             xParam = new string[] { edit.Text };
             xReturnFileds.Add(XA002C, 1);
         }
         LeaveCheckMainFunc(edit, xADMMJ, xParam, xReturnFileds);
     }
 }
예제 #15
0
 public new void SetOwnerEdit(DevExpress.XtraEditors.BaseEdit edit)
 {
     base.SetOwnerEdit(edit);
 }
예제 #16
0
 public void SetSefOwnerEdit(DevExpress.XtraEditors.BaseEdit edit)
 {
   this.SetOwnerEdit(edit);
 }