예제 #1
0
        private void btnInsertVipUrCloudminer_Click(object sender, EventArgs e)
        {
            VipSettingQueryModelGet vipSettingQueryModelGet = gvVipInfo.GetFocusedRow() as VipSettingQueryModelGet;

            if (vipSettingQueryModelGet != null)
            {
                SubformVipUrCloudminer subformVipUrCloudminer = new SubformVipUrCloudminer();
                subformVipUrCloudminer.SubformType = SubformType.Insert;
                VipUrCloudminerModelSend vipUrCloudminerModelSend = new VipUrCloudminerModelSend();
                vipUrCloudminerModelSend.VipId = vipSettingQueryModelGet.Id;
                subformVipUrCloudminer.VipUrCloudminerModelSend = vipUrCloudminerModelSend;
                subformVipUrCloudminer.VipSettingQueryModelGets = _vipSettingQueryModelGets;
                if (subformVipUrCloudminer.ShowDialog() == DialogResult.OK)
                {
                    QueryVipSetting();
                    gvVipInfo.FocusedRowHandle = _vipSettingQueryModelGets.IndexOf(_vipSettingQueryModelGets.First(n => n.Id == vipSettingQueryModelGet.Id));
                    gvVipInfo_FocusedRowChanged(null, null);
                }
            }
        }
예제 #2
0
 private void gvVipUrCloudminer_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
 {
     if (e.Clicks == 2)
     {
         VipSettingQueryModelGet vipSettingQueryModelGet = gvVipInfo.GetFocusedRow() as VipSettingQueryModelGet;
         VipUrCloudminer         vipUrCloudminer         = gvVipUrCloudminer.GetFocusedRow() as VipUrCloudminer;
         if (vipSettingQueryModelGet != null && vipUrCloudminer != null)
         {
             SubformVipUrCloudminer subformVipUrCloudminer = new SubformVipUrCloudminer();
             subformVipUrCloudminer.SubformType = SubformType.Show;
             VipUrCloudminerModelSend vipUrCloudminerModelSend = new VipUrCloudminerModelSend();
             vipUrCloudminerModelSend.Id = vipUrCloudminer.Id;
             vipUrCloudminerModelSend.CloudMinerCount        = vipUrCloudminer.CloudMinerCount;
             vipUrCloudminerModelSend.CommodityId            = vipUrCloudminer.CommodityId;
             vipUrCloudminerModelSend.VipId                  = vipSettingQueryModelGet.Id;
             subformVipUrCloudminer.VipUrCloudminerModelSend = vipUrCloudminerModelSend;
             subformVipUrCloudminer.VipSettingQueryModelGets = _vipSettingQueryModelGets;
             subformVipUrCloudminer.ShowDialog();
         }
     }
 }
예제 #3
0
        private void btnUpdateVipUrCloudminer_Click(object sender, EventArgs e)
        {
            VipSettingQueryModelGet vipSettingQueryModelGet = gvVipInfo.GetFocusedRow() as VipSettingQueryModelGet;
            VipUrCloudminer         vipUrCloudminer         = gvVipUrCloudminer.GetFocusedRow() as VipUrCloudminer;

            if (vipSettingQueryModelGet != null && vipUrCloudminer != null)
            {
                SubformVipUrCloudminer subformVipUrCloudminer = new SubformVipUrCloudminer();
                subformVipUrCloudminer.SubformType = SubformType.Edit;
                VipUrCloudminerModelSend vipUrCloudminerModelSend = new VipUrCloudminerModelSend();
                vipUrCloudminerModelSend.Id = vipUrCloudminer.Id;
                vipUrCloudminerModelSend.CloudMinerCount        = vipUrCloudminer.CloudMinerCount;
                vipUrCloudminerModelSend.CommodityId            = vipUrCloudminer.CommodityId;
                vipUrCloudminerModelSend.VipId                  = vipSettingQueryModelGet.Id;
                subformVipUrCloudminer.VipUrCloudminerModelSend = vipUrCloudminerModelSend;
                subformVipUrCloudminer.VipSettingQueryModelGets = _vipSettingQueryModelGets;
                if (subformVipUrCloudminer.ShowDialog() == DialogResult.OK)
                {
                    QueryVipSetting();
                    gvVipInfo.FocusedRowHandle = _vipSettingQueryModelGets.IndexOf(vipSettingQueryModelGet);
                    gvVipInfo_FocusedRowChanged(null, null);
                }
            }
        }