コード例 #1
0
        private void DG2_TableControlPushButtonClick(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellPushButtonClickEventArgs e)
        {
            try
            {
                int row = e.Inner.RowIndex - 2;

                int col   = e.Inner.ColIndex + 1;
                int field = e.TableControl.TableDescriptor.ColIndexToField(col);
                var vid   = DG2.Table.Records[row].GetValue("VendorID").ToString();
                if ((e.TableControl.TableDescriptor.Columns[field].HeaderText.ToLower()) == "set_dos")
                {
                    Set_Product_Dos spd = new Set_Product_Dos(vid);
                    spd.ShowDialog();
                }
                if ((e.TableControl.TableDescriptor.Columns[field].HeaderText.ToLower()) == "remove")
                {
                    DialogResult dt = MessageBox.Show("Do You Really Want to Delete", "Confirmation ?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (dt == DialogResult.Yes)
                    {
                        con.UpdateProductRecord("DELETE FROM [mbo].[PSVendorSchedule] WHERE [VendorID]='" + vid + "'");
                        myList.Clear();
                        DisplayRecords();
                        GridSetting();
                    }
                }
                if ((e.TableControl.TableDescriptor.Columns[field].HeaderText.ToLower()) == "auto_ordering")
                {
                    //GridTableCellStyleInfo style = this.DG2.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex);
                    //GridTableCellStyleInfoIdentity id = style.CellIdentity as GridTableCellStyleInfoIdentity;
                    ////To get the current record
                    //Record record = id.DisplayElement.GetRecord();
                    //if (record != null)
                    //{
                    //    string cellValue = record.GetValue("Auto_Ordering").ToString();



                    //}
                }
            } catch (Exception ex)
            { MessageBox.Show(ex.Message); }
        }
コード例 #2
0
        private void SetTargetbutton_Click(object sender, EventArgs e)
        {
            if (DOSradioButton.Checked)
            {
                var vid = VendorId_Name_combo.Text.Split(new[] { "-----" }, StringSplitOptions.None);
                if (All_Validations())

                {
                    using (Set_Product_Dos spd = new Set_Product_Dos(vid[1]))
                    {
                        spd.ShowDialog();
                        if (spd.IsDosSet)
                        {
                            DOSradioButton.Enabled = false;
                            // TargetradioButton.Checked = true;
                        }
                    }
                }
            }
        }