Пример #1
0
 private void RefreshEventListDetails(DevExpress.XtraGrid.Views.Grid.GridView _view)
 {
     cboCourse.EditValue      = _view.GetFocusedRowCellValue("FKeyCourse");
     cboSeries.EditValue      = _view.GetFocusedRowCellValue("FKeySeries");
     txtDateCreated.EditValue = _view.GetFocusedRowCellValue("DateCreated");
     txtRemarks.Text          = (string)_view.GetFocusedRowCellValue("Remarks");
 }
Пример #2
0
 void GetTiklaninlanSatirBilgileri(DevExpress.XtraGrid.Views.Grid.GridView liste)
 {
     TxtID.Text         = liste.GetFocusedRowCellValue("ID").ToString();//gridView'in tiklanilan satırın değerini getir.
     TxtBaslik.Text     = liste.GetFocusedRowCellValue("BASLIK").ToString();
     TxtIcerik.Text     = liste.GetFocusedRowCellValue("ICERIK").ToString();
     checkEdit1.Checked = bool.Parse(liste.GetFocusedRowCellValue("DURUM").ToString());
     //Durumu çağırıyoruz true false şeklinde o yüzden bunu bool'a ceviriyoruz ve tik şeklinde tabloya geliyor
 }
Пример #3
0
        public popPickupLocation(DevExpress.XtraGrid.Views.Grid.GridView gridView)
        {
            string skin = CommonUtil.AccessDB.GetConfig("skin");

            this.LookAndFeel.SkinName = skin;

            this.gridViewUser = gridView;

            InitializeComponent();
            InitGrid();
            bolLocCd = true;

            object value = gridView.GetFocusedRowCellValue(gridView.FocusedColumn);

            if (value == null || value == System.DBNull.Value)
            {
                scSearch.Text = "";
            }
            else
            {
                scSearch.Text = (string)value;
            }

            // Load Pickup Location of User
            Find();
        }
Пример #4
0
        private void bookmarkToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DevExpress.XtraGrid.Views.Grid.GridView view = jrnGridView;

            StringBuilder bkms = new StringBuilder();

            bkms.Append(view.GetFocusedRowCellValue(colBKMS));

            if (!bkms.ToString().Contains(Program.USRtag))
            {
                if (bkms.Length > 0)
                {
                    bkms.Append(", ");
                }
                bkms.Append(Program.USRtag);
            }
            else
            {
                bkms.Replace(", " + Program.USRtag, "");
                bkms.Replace(Program.USRtag, "");
            }
            view.SetFocusedRowCellValue(colBKMS, bkms.ToString());

            view.UpdateCurrentRow();
            jrnTableAdapter.Update(jurnalDataSet.JRN);
        }
Пример #5
0
        private void lookUpEditCNLQ_Properties_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            if (e.Button.Kind == DevExpress.XtraEditors.Controls.ButtonPredefines.OK)
            {
                LookUpEdit lue = sender as LookUpEdit;
                if (lue.ItemIndex < 0)
                {
                    return;
                }
                if (gvDetail.SelectedRowsCount == 0)
                {
                    XtraMessageBox.Show("Vui lòng chọn một đối tượng trên danh sách để xem thông tin chi tiết!");
                    return;
                }
                string pkName  = _data.DrTable["Pk"].ToString();
                string pkValue = gvDetail.GetFocusedRowCellValue(pkName).ToString();
                if (pkValue == string.Empty)
                {
                    return;
                }
                DataTable dtTable = lue.Properties.DataSource as DataTable;
                DataRow   dr      = dtTable.Rows[lue.ItemIndex];

                CDTData data1 = DataFactory.DataFactory.Create(DataType.Single, dr);
                data1.Condition = pkName + " = '" + pkValue + "'";
                FrmSingle frm = new FrmSingle(data1);
                frm.ShowDialog();
            }
        }
Пример #6
0
        private void repBuOpenPrice_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            // abrir cotización
            int            idprice_version = Convert.ToInt32(grid_view.GetFocusedRowCellValue(gcolHis_Idprice_version));
            CPrice_version price_version   = new CPrice_versionFactory().GetByPrimaryKey(new CPrice_versionKeys(idprice_version));
            FormPrice      fmPrice         = new FormPrice(price_version, LoadData.MasterSearchPrice);

            fmPrice.Show();
        }
 void Sec()
 {
     try
     {
         SecimID = int.Parse(gridView1.GetFocusedRowCellValue("ID").ToString());
     }
     catch (Exception)
     {
         SecimID = -1;
     }
 }
Пример #8
0
        /// <summary>
        /// 右键复制
        /// </summary>
        /// <param name="view"></param>
        /// <param name="focuseName"></param>
        public static void copyResult(DevExpress.XtraGrid.Views.Grid.GridView view, string focuseName)
        {
            if (string.IsNullOrEmpty(focuseName))
            {
                XtraMessageBox.Show("请选择复制内容");
                return;
            }
            object result = view.GetFocusedRowCellValue(focuseName);

            if (result == null)
            {
                return;
            }

            Clipboard.SetDataObject(result);
        }
Пример #9
0
        public popPopup(DevExpress.XtraGrid.Views.Grid.GridView gridView)
        {
            string skin = CommonUtil.AccessDB.GetConfig("skin");

            this.LookAndFeel.SkinName = skin;

            this.gridView = gridView;

            InitializeComponent();

            object value = gridView.GetFocusedRowCellValue(gridView.FocusedColumn);

            if (value == null || value == System.DBNull.Value)
            {
                etFind.Text = "";
            }
            else
            {
                etFind.Text = (string)value;
            }
        }
Пример #10
0
        private void gridView1_ShowingEditor(object sender, CancelEventArgs e)
        {
            SalesOrder so = (SalesOrder)SalesOrderBindingSource.DataSource;

            if (so.IsEditable && so.CustomerID > 0)
            {
                DevExpress.XtraGrid.Views.Grid.GridView vw = (DevExpress.XtraGrid.Views.Grid.GridView)sender;
                if ((vw.FocusedColumn.FieldName == "StockItemID"))
                {
                    e.Cancel = false;
                }

                else
                {
                    e.Cancel = (vw.GetFocusedRowCellValue("StockItem") == null);
                }
            }
            else
            {
                e.Cancel = !(so.IsEditable && so.CustomerID > 0);
            }
        }
Пример #11
0
        /// <summary>
        /// 显示girdview行号
        /// </summary>
        /// <param name="gv"></param>
        public static void SetRowNum(DevExpress.XtraGrid.Views.Grid.GridView gv)
        {
            try
            {
                //添加行号
                gv.IndicatorWidth          = 50;
                gv.CustomDrawRowIndicator += delegate(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
                {
                    e.Appearance.Font = new System.Drawing.Font("宋体", 9);
                    e.Info.ImageIndex = -1;
                    if (e.Info.IsRowIndicator && e.RowHandle >= 0)
                    {
                        e.Info.DisplayText = (e.RowHandle + 1).ToString();
                    }
                };

                //允许ctrl+c复制
                gv.KeyDown += delegate(object sender, System.Windows.Forms.KeyEventArgs e)
                {
                    if (e.Control & e.KeyCode == Keys.C)
                    {
                        Clipboard.Clear();
                        Clipboard.SetDataObject(gv.GetFocusedRowCellValue(gv.FocusedColumn).ToString());
                        e.Handled = true;
                    }
                };

                if (gv.Columns["C_EMP_ID"] != null)
                {
                    gv.Columns["C_EMP_ID"].ColumnEdit = RV.UI.UserInfo.repoUserName;
                    gv.Columns["C_EMP_ID"].OptionsColumn.AllowEdit = false;
                }

                CommonSub commonSub = new CommonSub();
                if (gv.Columns["C_SHIFT"] != null)
                {
                    gv.Columns["C_SHIFT"].ColumnEdit = commonSub.GetBCIdDescItemComboBox();
                    gv.Columns["C_SHIFT"].OptionsColumn.AllowEdit = false;
                }
                if (gv.Columns["C_GROUP"] != null)
                {
                    gv.Columns["C_GROUP"].ColumnEdit = commonSub.GetBZIdDescItemComboBox();
                    gv.Columns["C_GROUP"].OptionsColumn.AllowEdit = false;
                }
                if (gv.Columns["C_WE_SHIFT"] != null)
                {
                    gv.Columns["C_WE_SHIFT"].ColumnEdit = commonSub.GetBCIdDescItemComboBox();
                    gv.Columns["C_WE_SHIFT"].OptionsColumn.AllowEdit = false;
                }
                if (gv.Columns["C_WE_GROUP"] != null)
                {
                    gv.Columns["C_WE_GROUP"].ColumnEdit = commonSub.GetBZIdDescItemComboBox();
                    gv.Columns["C_WE_GROUP"].OptionsColumn.AllowEdit = false;
                }
                if (gv.Columns["C_PRODUCE_SHIFT"] != null)
                {
                    gv.Columns["C_PRODUCE_SHIFT"].ColumnEdit = commonSub.GetBCIdDescItemComboBox();
                    gv.Columns["C_PRODUCE_SHIFT"].OptionsColumn.AllowEdit = false;
                }
                if (gv.Columns["C_PRODUCE_GROUP"] != null)
                {
                    gv.Columns["C_PRODUCE_GROUP"].ColumnEdit = commonSub.GetBZIdDescItemComboBox();
                    gv.Columns["C_PRODUCE_GROUP"].OptionsColumn.AllowEdit = false;
                }
                gv.BestFitColumns();
            }
            catch
            {
                gv.BestFitColumns();
            }
        }
 public static bool RecupererElementRow(RadioGroup radioGroup, PictureEdit PicLice1, PictureEdit PicLice2, PictureEdit PicLice3, DevExpress.XtraGrid.Views.Grid.GridView SourceRecuperation, string ElementRecuperer)
 {
     if (SourceRecuperation.GetFocusedRowCellValue(ElementRecuperer).ToString().Trim() != string.Empty)
     {
         string Licenc = SourceRecuperation.GetFocusedRowCellValue(ElementRecuperer).ToString();
         if (Licenc == "Licence1")
         {
             radioGroup.SelectedIndex = radioGroup.Properties.Items.IndexOf(radioGroup.Properties.Items.Where(it => it.Description == Licenc).FirstOrDefault());
             radioGroup.Properties.Appearance.BackColor         = Color.Lime;
             radioGroup.Properties.AppearanceDisabled.BackColor = Color.Lime;
             radioGroup.Properties.AppearanceFocused.BackColor  = Color.Lime;
             radioGroup.Properties.AppearanceReadOnly.BackColor = Color.Lime;
             PicLice1.BackColor = Color.Lime;
             PicLice2.BackColor = Color.Lime;
             PicLice3.BackColor = Color.Lime;
         }
         else if (Licenc == "Licence2")
         {
             radioGroup.SelectedIndex = radioGroup.Properties.Items.IndexOf(radioGroup.Properties.Items.Where(it => it.Description == Licenc).FirstOrDefault());
             radioGroup.Properties.Appearance.BackColor         = Color.Gold;
             radioGroup.Properties.AppearanceDisabled.BackColor = Color.Gold;
             radioGroup.Properties.AppearanceFocused.BackColor  = Color.Gold;
             radioGroup.Properties.AppearanceReadOnly.BackColor = Color.Gold;
             PicLice1.BackColor = Color.Gold;
             PicLice2.BackColor = Color.Gold;
             PicLice3.BackColor = Color.Gold;
         }
         else if (Licenc == "Licence3")
         {
             radioGroup.SelectedIndex = radioGroup.Properties.Items.IndexOf(radioGroup.Properties.Items.Where(it => it.Description == Licenc).FirstOrDefault());
             radioGroup.Properties.Appearance.BackColor         = Color.Aqua;
             radioGroup.Properties.AppearanceDisabled.BackColor = Color.Aqua;
             radioGroup.Properties.AppearanceFocused.BackColor  = Color.Aqua;
             radioGroup.Properties.AppearanceReadOnly.BackColor = Color.Aqua;
             PicLice1.BackColor = Color.Aqua;
             PicLice2.BackColor = Color.Aqua;
             PicLice3.BackColor = Color.Aqua;
         }
         else
         {
             radioGroup.SelectedIndex = 0;
             radioGroup.Properties.Appearance.BackColor         = Color.White;
             radioGroup.Properties.AppearanceDisabled.BackColor = Color.White;
             radioGroup.Properties.AppearanceFocused.BackColor  = Color.White;
             radioGroup.Properties.AppearanceReadOnly.BackColor = Color.White;
             PicLice1.BackColor = Color.White;
             PicLice2.BackColor = Color.White;
             PicLice3.BackColor = Color.White;
             return(false);
         }
         return(true);
     }
     else
     {
         radioGroup.SelectedIndex = 0;
         radioGroup.Properties.Appearance.BackColor         = Color.White;
         radioGroup.Properties.AppearanceDisabled.BackColor = Color.White;
         radioGroup.Properties.AppearanceFocused.BackColor  = Color.White;
         radioGroup.Properties.AppearanceReadOnly.BackColor = Color.White;
         PicLice1.BackColor = Color.White;
         PicLice2.BackColor = Color.White;
         PicLice3.BackColor = Color.White;
         return(false);
     }
 }
        /// <summary>
        ///   // methode permet a l'option coché dans le combobox de safficher dans le textedit
        /// </summary>
        /// <param name="NomRadioButton"></param>
        /// <param name="Options"></param>
        //public static void SyncronisationRadioOption(CheckEdit NomRadioButton, TextEdit Options)
        //{
        //    Options.Text = (NomRadioButton.Checked) ? NomRadioButton.Text : string.Empty;
        //}

        /// <summary>
        ///    methode permet a l'option coché dans le combobox de safficher dans le textedit     /// </summary>
        /// <param name="DestinationData"></param>
        /// <param name="SourceRecuperation"></param>
        /// <param name="ElementRecuperer"></param>
        public static void RecupererElementRow(TextEdit DestinationData, DevExpress.XtraGrid.Views.Grid.GridView SourceRecuperation, string ElementRecuperer)
        {
            DestinationData.Text = SourceRecuperation.GetFocusedRowCellValue(ElementRecuperer).ToString();
        }
Пример #14
0
        public popRefund(DevExpress.XtraGrid.Views.Grid.GridView gridView, DevExpress.XtraGrid.Views.Grid.GridView gridViewDetail, string ordNo)
        {
            InitializeComponent();
            this.LookAndFeel.SkinName = CommonUtil.AccessDB.GetConfig("skin");

            string lang = CommonUtil.AccessDB.GetConfig("lang");

            if (!String.IsNullOrEmpty(lang) && lang == "vi")
            {
                this.Text         = "Trả hàng/Hoàn tiền";
                radioButton1.Text = "Sản phẩm không đúng.";
                radioButton2.Text = "Bị khách hàng từ chối.";
                radioButton3.Text = "Lỗi bảo quản sản phẩm (côn trùng ăn, ...)";
                radioButton4.Text = "Sản phẩm bị hết hạn.";
                radioButton5.Text = "Bị hư hại khi giao hàng.";
            }
            else if (!String.IsNullOrEmpty(lang) && lang == "ko")
            {
                this.Text         = "반품 / 환불";
                radioButton1.Text = "피킹 제품이 올바르지 않습니다";
                radioButton2.Text = "고객이 거부 함";
                radioButton3.Text = "제품 보관 오류 (곤충 먹기 등)";
                radioButton4.Text = "만료 된 제품";
                radioButton5.Text = "배송시 파손";
            }
            else
            {
                this.Text         = "Return / Refund";
                radioButton1.Text = "Picking products are not correct.";
                radioButton2.Text = "Rejected by customer.";
                radioButton3.Text = "Products storage error (insect eating, etc.)";
                radioButton4.Text = "Expired products.";
                radioButton5.Text = "Broken on delivery.";
            }
            radioButton1.Select();
            radioGroup.BackColor = this.BackColor;

            this.Refresh();

            this.gridView       = gridView;
            this.gridViewDetail = gridViewDetail;


            etOrdNo.Text = ordNo;

            priceTotal      = Double.Parse(gridView.GetFocusedRowCellValue("recv_price_total").ToString());
            pricePoint      = Double.Parse(gridView.GetFocusedRowCellValue("recv_price_point").ToString());
            priceCard       = Double.Parse(gridView.GetFocusedRowCellValue("recv_price_card").ToString());
            priceEventPoint = Double.Parse(gridView.GetFocusedRowCellValue("recv_price_event_point").ToString());;
            priceCoupon     = Double.Parse(gridView.GetFocusedRowCellValue("recv_price_coupon").ToString());

            priceReal = Double.Parse(gridView.GetFocusedRowCellValue("recv_price_real").ToString());



            if (gridView.GetFocusedRowCellValue("ret_tp").ToString() == "total")
            {
                retTotal = priceTotal;
                retReal  = priceReal;
            }
            else
            {
                CalcReturnPrice();
            }

            etRetPriceTotal.Value = Convert.ToDecimal(retTotal);
            etRetPriceReal.Value  = Convert.ToDecimal(retReal);


            btnRefundOrder.Focus();
        }