private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { try { int rowhandle = this.gridView1.FocusedRowHandle; Models.dd_shop_signusers dd_Shop_Signusers = new Models.dd_shop_signusers(); dd_Shop_Signusers.name = this.gridView1.GetRowCellValue(rowhandle, "name").ToString(); dd_Shop_Signusers.telno = this.gridView1.GetRowCellValue(rowhandle, "telno").ToString(); dd_Shop_Signusers.maxusenums = Convert.ToInt32(this.gridView1.GetRowCellValue(rowhandle, "maxusenums")); dd_Shop_Signusers.maxprice = Convert.ToDecimal(this.gridView1.GetRowCellValue(rowhandle, "maxprice")); dd_Shop_Signusers.id = Convert.ToInt32(this.gridView1.GetRowCellValue(rowhandle, "id")); if (e.Button.Index == 0) { MyForm.MemberManagement.ProtocolDetaileForm protocolDetaile = new MyForm.MemberManagement.ProtocolDetaileForm(dd_Shop_Signusers, 1); protocolDetaile.StartPosition = FormStartPosition.CenterScreen; protocolDetaile.ShowDialog(); RefreshGridList(); } else if (e.Button.Index == 1) { if (XtraMessageBox.Show("确定清帐?清帐后账单将归零", "清帐确认", MessageBoxButtons.YesNo) == DialogResult.OK) { MemberCard.ClearBillSignUser(dd_Shop_Signusers.id); Utils.utils.ShowTip("提示", "清帐成功!"); RefreshGridList(); } } } catch { } }
private void simpleButton1_Click(object sender, EventArgs e) { Models.dd_shop_signusers dd_Shop_Signusers = new Models.dd_shop_signusers(); MyForm.MemberManagement.ProtocolDetaileForm protocolDetaile = new MyForm.MemberManagement.ProtocolDetaileForm(dd_Shop_Signusers, 0); protocolDetaile.StartPosition = FormStartPosition.CenterScreen; protocolDetaile.ShowDialog(); RefreshGridList(); }