using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace LYFZ.Software.MainBusiness.ReportPrint.SuperSmallForm
{
public partial class PrintVersionSelectSuperSmallForm : LYFZ.Software.UI.ReportPrint.SuperSmallForm.PrintVersionSelectSuperSmallForm
{
public PrintVersionSelectSuperSmallForm()
{
}
private string _loadtype = "";
public string LoadType
{
set { _loadtype = value; }
get { return _loadtype; }
}
private string _englishname = "";
public string EnglishName
{
set { _englishname = value; }
get { return _englishname; }
}
///
/// 窗体加载事件
///
///
///
protected override void PrintVersionSelect_Load(object sender, EventArgs e)
{
if (LoadType != "")
{
DataTable tbl = new LYFZ.BLL.BLL_ErpReportModel().GetList("Rmd_ChineseName='" + LoadType + "'").Tables[0];
for (int i = 0; i < tbl.Rows.Count; i++)
{
DataGridViewRow dgvr = new DataGridViewRow();
DataGridViewCell cell = null;
cell = new DataGridViewTextBoxCell();
cell.Value = tbl.Rows[i]["Rmd_ChineseName"].ToString().Trim() + "_" + tbl.Rows[i]["Rmd_VersionName"].ToString().Trim();
dgvr.Cells.Add(cell);
cell = new DataGridViewTextBoxCell();
cell.Value = tbl.Rows[i]["Rmd_EnglishName"].ToString().Trim();
dgvr.Cells.Add(cell);
this.dgvData.Rows.Add(dgvr);
}
}
}
///
/// 数据列表双击事件
///
///
///
protected override void dgvData_DoubleClick(object sender, EventArgs e)
{
if (this.dgvData.Rows.Count > 0)
{
if (this.dgvData.CurrentRow.Index >= 0)
{
if (MessageBoxCustom.Show("你选择了" + this.dgvData.Rows[this.dgvData.CurrentRow.Index].Cells["Column1"].Value.ToString().Trim() + "做打印,\r\n 是否确定", "温馨提示", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
EnglishName = this.dgvData.Rows[this.dgvData.CurrentRow.Index].Cells["Column2"].Value.ToString().Trim(); this.Close();
}
}
}
}
///
/// 确定
///
///
///
protected override void btnOK_Click(object sender, EventArgs e)
{
if (this.dgvData.Rows.Count > 0)
{
if (this.dgvData.CurrentRow.Index > 0)
{ EnglishName = this.dgvData.Rows[this.dgvData.CurrentRow.Index].Cells["Column2"].Value.ToString().Trim(); this.Close(); }
}
}
///
/// 取消
///
///
///
protected override void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
}
}