using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Data;
|
using System.Drawing;
|
using System.Text;
|
using System.Windows.Forms;
|
|
namespace PayM
|
{
|
public partial class Pay_WorkTimesCardBill4 : Form
|
{
|
public int HCode;
|
public string HPathBakServer;
|
public string HHardDisk;
|
public int HDelDays;
|
|
public string HBDeptNumber;
|
public string HEDeptNumber;
|
public int HDeptType; //ÎïÁ϶Î
|
public int HSetType; //ºËË㷽ʽ
|
public int HYear; //»á¼ÆÄê
|
public int HPeriod; //»á¼ÆÔÂ
|
|
public Pay_WorkTimesCardBill4()
|
{
|
InitializeComponent();
|
}
|
|
private void Pay_WorkTimesCardBill4_Load(object sender, EventArgs e)
|
{
|
timer1.Enabled = true;
|
}
|
|
private void button1_Click(object sender, EventArgs e)
|
{
|
HCode=1;
|
this.Hide();
|
}
|
|
private void button2_Click(object sender, EventArgs e)
|
{
|
HCode = 2;
|
this.Hide();
|
}
|
|
private void button3_Click(object sender, EventArgs e)
|
{
|
HCode = 3;
|
this.Hide();
|
}
|
|
private void timer1_Tick(object sender, EventArgs e)
|
{
|
|
timer1.Enabled = false;
|
SetMateStdPrice();
|
}
|
|
//ÅжϺËËãÐÅÏ¢
|
private bool AllowBegin()
|
{
|
return true;
|
}
|
//ºËËã
|
private void SetMateStdPrice()
|
{
|
if (!AllowBegin())
|
{
|
MessageBox.Show("ÄúÉèÖúËËãÐÅÏ¢ÓдíÎ󣬲»ÄܽøÐкËË㣡ÇëÓë¹ÜÀíÔ±ÁªÏµ");
|
return;
|
}
|
SetMateStdPrice_CZ();
|
|
}
|
//°´²úÖµ
|
private void SetMateStdPrice_CZ()
|
{
|
//µÃµ½ºËËãµÄ ²úÆ·ID£¬·ÑÓÃÏîÄ¿ID£¬±¾µ¥·ÑÓÃ=±¾ÆÚÈë¿â½ð¶î/±¾ÆÚÈë¿â×ܽð¶î*±¾ÆÚ·ÑÓýð¶î£¬×Ü·ÑÓ㬱ÈÀý=±¾µ¥·ÑÓÃ/±¾ÆÚ·ÑÓýð¶î
|
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
|
DataSet oDs;
|
oDs = oCn.RunProcReturn("exec h_p_KQ_GetWorkTimesCardBill " + HYear.ToString() + "," + HPeriod.ToString(), "gy_czygl");
|
if (oDs == null || oDs.Tables[0].Rows.Count == 0)
|
{
|
MessageBox.Show("δ²éѯµ½¿¼ÇÚÊý¾Ý£¡");
|
return;
|
}
|
//Çå¿Õ ±¾ÔÂÊý¾Ý
|
//oCn.RunProc
|
//
|
pb1.Maximum = oDs.Tables[0].Rows.Count;
|
pb1.Value = 0;
|
for (int i = 0; i < oDs.Tables[0].Rows.Count; i++)
|
{
|
System.Windows.Forms.Application.DoEvents();
|
|
//ÐÂÔö¼Ç¼
|
oCn.RunProc(" exec h_p_KQ_WorkTimesCardBill_Add " + HYear.ToString() + "," + HPeriod.ToString() + ",'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[i]["¹¤ºÅ"]) + "'");
|
System.Windows.Forms.Application.DoEvents();
|
pb1.Value = i + 1;
|
lblHMaterName.Text = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[i]["Ö°Ô±Ãû³Æ"]);
|
lblHCount.Text = pb1.Value.ToString() + "/" + pb1.Maximum.ToString();
|
System.Windows.Forms.Application.DoEvents();
|
}
|
}
|
|
}
|
}
|