using SegmentationWeight.Rpc;
|
|
using SegmentationWeight.Rpc.Dto;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace SegmentationWeight
|
|
{
|
|
public partial class QieDanDialog : Form
|
|
{
|
|
public QieDanDialog()
|
|
{
|
|
InitializeComponent();
|
|
detailGridView1.AutoGenerateColumns = false;
|
|
var details = SegmentationWeightRecordRpc.GetInstance().GetTodayGroupFlagList();
|
|
detailGridView1.DataSource = null;
|
|
detailGridView1.DataSource = details;
|
|
detailGridView1.Refresh();
|
|
}
|
|
|
|
public string GroupFlag { get; set; }
|
|
|
|
private void closeBtn_Click(object sender, EventArgs e)
|
|
{
|
|
this.Close();
|
|
}
|
|
|
|
private void detailGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
|
{
|
|
if (e.RowIndex == -1)
|
|
return;
|
|
if (e.ColumnIndex != detailGridView1.ColumnCount - 1)
|
|
return;
|
|
var entity = detailGridView1.CurrentRow.DataBoundItem as SegmentationWeightRecord;
|
|
GroupFlag = entity.GroupFlag;
|
|
DialogResult = DialogResult.OK;
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|