Ejemplo n.º 1
0
        private void btnAddVipUrFans_Click(object sender, EventArgs e)
        {
            VipSettingQueryModelGet vipSettingQueryModelGet = gvVipInfo.GetFocusedRow() as VipSettingQueryModelGet;

            if (vipSettingQueryModelGet != null)
            {
                SubformVipUrFans subformVipUrFans = new SubformVipUrFans();
                subformVipUrFans.SubformType = SubformType.Insert;
                VipUrFansModelSend vipUrFansModelSend = new VipUrFansModelSend();
                vipUrFansModelSend.VipId                   = vipSettingQueryModelGet.Id;
                subformVipUrFans.VipUrFansModelSend        = vipUrFansModelSend;
                subformVipUrFans._vipSettingQueryModelGets = _vipSettingQueryModelGets;
                if (subformVipUrFans.ShowDialog() == DialogResult.OK)
                {
                    QueryVipSetting();
                    gvVipInfo.FocusedRowHandle = _vipSettingQueryModelGets.IndexOf(_vipSettingQueryModelGets.First(n => n.Id == vipSettingQueryModelGet.Id));
                    gvVipInfo_FocusedRowChanged(null, null);
                }
            }
        }
Ejemplo n.º 2
0
 private void gvVipUrFans_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
 {
     if (e.Clicks == 2)
     {
         VipSettingQueryModelGet vipSettingQueryModelGet = gvVipInfo.GetFocusedRow() as VipSettingQueryModelGet;
         VipUrFans vipUrFans = gvVipUrFans.GetFocusedRow() as VipUrFans;
         if (vipSettingQueryModelGet != null && vipUrFans != null)
         {
             SubformVipUrFans subformVipUrFans = new SubformVipUrFans();
             subformVipUrFans.SubformType = SubformType.Show;
             VipUrFansModelSend vipUrFansModelSend = new VipUrFansModelSend();
             vipUrFansModelSend.Id                      = vipUrFans.Id;
             vipUrFansModelSend.FansVipId               = vipUrFans.FansVipId;
             vipUrFansModelSend.FansCount               = vipUrFans.FansCount;
             vipUrFansModelSend.VipId                   = vipSettingQueryModelGet.Id;
             subformVipUrFans.VipUrFansModelSend        = vipUrFansModelSend;
             subformVipUrFans._vipSettingQueryModelGets = _vipSettingQueryModelGets;
             subformVipUrFans.ShowDialog();
         }
     }
 }
Ejemplo n.º 3
0
        private void btnUpdateVipUrFans_Click(object sender, EventArgs e)
        {
            VipSettingQueryModelGet vipSettingQueryModelGet = gvVipInfo.GetFocusedRow() as VipSettingQueryModelGet;
            VipUrFans vipUrFans = gvVipUrFans.GetFocusedRow() as VipUrFans;

            if (vipSettingQueryModelGet != null && vipUrFans != null)
            {
                SubformVipUrFans subformVipUrFans = new SubformVipUrFans();
                subformVipUrFans.SubformType = SubformType.Edit;
                VipUrFansModelSend vipUrFansModelSend = new VipUrFansModelSend();
                vipUrFansModelSend.Id                      = vipUrFans.Id;
                vipUrFansModelSend.FansVipId               = vipUrFans.FansVipId;
                vipUrFansModelSend.FansCount               = vipUrFans.FansCount;
                vipUrFansModelSend.VipId                   = vipSettingQueryModelGet.Id;
                subformVipUrFans.VipUrFansModelSend        = vipUrFansModelSend;
                subformVipUrFans._vipSettingQueryModelGets = _vipSettingQueryModelGets;
                if (subformVipUrFans.ShowDialog() == DialogResult.OK)
                {
                    QueryVipSetting();
                    gvVipInfo.FocusedRowHandle = _vipSettingQueryModelGets.IndexOf(vipSettingQueryModelGet);
                    gvVipInfo_FocusedRowChanged(null, null);
                }
            }
        }