using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using SQLHelper; namespace BLL { public partial class Gy_OpenTmp : Form { private int HItemIDCol = 0; private int HNumberCol = 0; private int HOpenTmpCol = 0; const string ViewName = "h_v_Gy_OpenTmpList"; public DBUtility.ClsPub.Enum_InputMode InputMode; const string ModName = "打印模板"; public long HItemID;//项目ID public string sCondition; //过滤条件 ClsCN oCn = new ClsCN(); ClsGy_OpenTmp_Ctl oAreaSet = new ClsGy_OpenTmp_Ctl(); ClsGy_OpenTmp_View oAreaSetHlp = new ClsGy_OpenTmp_View(); TreeNode CurNode = new TreeNode(); public Pub_Class.ClsPub.Enum_OKTag OKTag; public string sBillName; public string sBillModel; public string sOpenTmp; public Gy_OpenTmp() { InitializeComponent(); } //以下代码基本不需要修改 #region 固定代码 //保存GRID列宽 private void Gy_OpenTmp_FormClosing(object sender, FormClosingEventArgs e) { DBUtility.ClsPub.SaveGridView(grdMain, this.Name, DBUtility.ClsPub.AppPath); } //窗体加载 private void Gy_OpenTmp_Load(object sender, EventArgs e) { initGrid(); InputMode =DBUtility.ClsPub.Enum_InputMode.InputMode_View; RefreshTool(); } private bool AllowSave() { if (txtHModel.Text.Trim() == "") { MessageBox.Show("模板名称不能为空!", "提示"); return false; } return true; } //新增 private void AddNew() { InputMode = DBUtility.ClsPub.Enum_InputMode.InputMode_AddNew; Init(); } //退出模块 private void tc_Click(object sender, EventArgs e) { OKTag = Pub_Class.ClsPub.Enum_OKTag.OKTag_Cancel; this.Visible = false; } //刷新 private void xs_Click(object sender, EventArgs e) { Display(); } //查询 private void cx_Click(object sender, EventArgs e) { Display(); } //得到对应列 private Int32 Fun_GetCol(string sCol)//Lock { for (int c = 0; c