Esempio n. 1
0
        protected override void custom2()
        {
            if (frmSelectStep == SelectStep.Customer)
            {
                if (gvCustomer.DataRowCount > 0)
                {
                    //设置按钮图片文字及窗口状态
                    frmSelectStep           = SelectStep.Product;
                    barbtn1.Enabled         = true;
                    barbtn2.Caption         = "完成";
                    barbtn2.LargeImageIndex = 4;
                    customerID = (int)gvCustomer.GetFocusedRowCellValue("id");
                    SetProductGrid(customerID);
                }
            }
            else
            {
                selectProductlst = new List <T_Product>();
                var idx = gvProduct.GetSelectedRows();
                if (idx.Length == 0)
                {
                    XtraMessageBox.Show("未有选中的产品");
                    return;
                }
                for (int i = 0; i < idx.Length; i++)
                {
                    selectProductlst.Add((T_Product)gvProduct.GetRow(idx[i]));
                }

                this.DialogResult = DialogResult.OK;
            }
        }
Esempio n. 2
0
 private void gvCustomer_DoubleClick(object sender, EventArgs e)
 {
     if (gvCustomer.DataRowCount > 0)
     {
         //设置按钮图片文字及窗口状态
         frmSelectStep           = SelectStep.Product;
         barbtn1.Enabled         = true;
         barbtn2.Caption         = "完成";
         barbtn2.LargeImageIndex = 4;
         customerID = (int)gvCustomer.GetFocusedRowCellValue("id");
         SetProductGrid(customerID);
     }
 }
Esempio n. 3
0
        protected override void custom1()
        {
            //设置按键图文字及窗口状态
            this.barbtn1.Visibility = BarItemVisibility.Always;
            barbtn1.LargeImageIndex = 12;
            barbtn1.Caption = "上一步";
            barbtn1.Enabled = false;
            this.barbtn2.Visibility = BarItemVisibility.Always;
            barbtn2.LargeImageIndex = 13;
            barbtn2.Caption = "下一步";
            frmSelectStep = SelectStep.Customer;

            SetCustomerGrid();
        }
Esempio n. 4
0
        protected override void custom1()
        {
            //设置按键图文字及窗口状态
            this.barbtn1.Visibility = BarItemVisibility.Always;
            barbtn1.LargeImageIndex = 12;
            barbtn1.Caption         = "上一步";
            barbtn1.Enabled         = false;
            this.barbtn2.Visibility = BarItemVisibility.Always;
            barbtn2.LargeImageIndex = 13;
            barbtn2.Caption         = "下一步";
            frmSelectStep           = SelectStep.Customer;

            SetCustomerGrid();
        }
Esempio n. 5
0
        protected override void FormLoad()
        {
            frmSelectStep = SelectStep.Customer;
            this.ribbonControl1.LargeImages = this.selectProImage;
            this.okButton.Visibility        = BarItemVisibility.Never;
            //this.okButton.LargeImageIndex = 7;
            this.barbtn1.Visibility = BarItemVisibility.Always;
            barbtn1.LargeImageIndex = 12;
            barbtn1.Caption         = "上一步";
            barbtn1.Enabled         = false;
            this.barbtn2.Visibility = BarItemVisibility.Always;
            barbtn2.LargeImageIndex = 13;
            barbtn2.Caption         = "下一步";

            SetCustomerGrid();
        }
Esempio n. 6
0
        protected override void custom2()
        {
            if (frmSelectStep == SelectStep.Customer)
            {
                if (gvCustomer.DataRowCount > 0)
                {
                    //设置按钮图片文字及窗口状态
                    frmSelectStep = SelectStep.Product;
                    barbtn1.Enabled = true;
                    barbtn2.Caption = "完成";
                    barbtn2.LargeImageIndex = 4;
                    customerID = (int)gvCustomer.GetFocusedRowCellValue("id");
                    SetProductGrid(customerID);
                }
            }
            else
            {
                selectProductlst = new List<T_Product>();
                var idx = gvProduct.GetSelectedRows();
                if(idx.Length==0)
                {
                    XtraMessageBox.Show("未有选中的产品");
                    return;
                }
                for (int i = 0; i < idx.Length; i++)
                {
                    selectProductlst.Add((T_Product)gvProduct.GetRow(idx[i]));
                }

                this.DialogResult = DialogResult.OK;
            }
        }
Esempio n. 7
0
 private void gvCustomer_DoubleClick(object sender, EventArgs e)
 {
     if (gvCustomer.DataRowCount > 0)
     {
         //设置按钮图片文字及窗口状态
         frmSelectStep = SelectStep.Product;
         barbtn1.Enabled = true;
         barbtn2.Caption = "完成";
         barbtn2.LargeImageIndex = 4;
         customerID = (int)gvCustomer.GetFocusedRowCellValue("id");
         SetProductGrid(customerID);
     }
 }
Esempio n. 8
0
        protected override void FormLoad()
        {
            frmSelectStep = SelectStep.Customer;
            this.ribbonControl1.LargeImages = this.selectProImage;
            this.okButton.Visibility = BarItemVisibility.Never;
            //this.okButton.LargeImageIndex = 7;
            this.barbtn1.Visibility = BarItemVisibility.Always;
            barbtn1.LargeImageIndex = 12;
            barbtn1.Caption = "上一步";
            barbtn1.Enabled = false;
            this.barbtn2.Visibility = BarItemVisibility.Always;
            barbtn2.LargeImageIndex = 13;
            barbtn2.Caption = "下一步";

            SetCustomerGrid();
        }