using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Data;
|
using System.Drawing;
|
using System.Text;
|
using System.Windows.Forms;
|
using Pub_Class;
|
|
namespace WorkM
|
{
|
public partial class Sc_ICMOBillList_K3Dlg : Form
|
{
|
public Sc_ICMOBillList_K3Dlg()
|
{
|
InitializeComponent();
|
}
|
public string sWhere = "";
|
|
public int IsOk;
|
|
private void cmdCancel_Click(object sender, EventArgs e)
|
{
|
IsOk = 2;
|
this.Visible = false;
|
}
|
|
private bool AllowOK()
|
{
|
if (DBUtility.ClsPub.isLong(txtHRoutingID.Tag) == 0)
|
{
|
MessageBox.Show("¹¤ÒÕ·Ïß²»ÄÜΪ¿Õ£¡");
|
return false;
|
}
|
return true;
|
}
|
|
private void cmdOK_Click(object sender, EventArgs e)
|
{
|
if (!AllowOK())
|
{
|
return;
|
}
|
//
|
IsOk = 1;
|
this.Visible = false;
|
}
|
|
private void Sc_ICMOBillList_K3Dlg_Activated(object sender, EventArgs e)
|
{
|
IsOk = 0;
|
}
|
|
private void cmdHBDeptID_Click(object sender, EventArgs e)
|
{
|
DAL.Cls_S_Gy_RoutingBill oGy_RoutingBill = new DAL.Cls_S_Gy_RoutingBill();
|
if (oGy_RoutingBill.Refresh(sWhere)) //Ñ¡ÔñÔµ¥
|
{
|
FillSelectData(oGy_RoutingBill.oBillSelectColl);
|
}
|
}
|
|
private void txtHBDeptID_TextChanged(object sender, EventArgs e)
|
{
|
if (txtHRoutingID.Text.Trim() == "")
|
txtHRoutingID.Tag = "0";
|
}
|
|
//
|
private void FillSelectData(List<DBUtility.BillSelect> oList)
|
{
|
DataSet Ds;
|
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
|
int i = -1;
|
foreach (DBUtility.BillSelect oSelectRow in oList)
|
{
|
i = i + 1;
|
//¹¤ÒÕ·Ïß
|
if (oSelectRow.BillType == "3301")
|
{
|
//µÃµ½ÐÅÏ¢
|
Ds = oCn.RunProcReturn("select * from h_v_Gy_RoutingBillList where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_Gy_RoutingBillList");
|
//дÈëÐÅÏ¢
|
Sub_WriteInForm(Ds.Tables[0], i);
|
}
|
}
|
}
|
//¸ù¾ÝTABLEдÈë½çÃæ
|
private void Sub_WriteInForm(DataTable oTable, int i)
|
{
|
//¼ÓÔØ±íÍ·
|
this.txtHRoutingID.Tag = oTable.Rows[0]["HMainID"].ToString();
|
this.txtHRoutingID.Text = oTable.Rows[0]["¹¤ÒÕÃû³Æ"].ToString();
|
}
|
|
|
|
|
|
}
|
}
|