using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace APSM { public partial class Gy_WorkTimesWWDlg : Form { public Gy_WorkTimesWWDlg() { InitializeComponent(); } public long HSourceID = 0; private void cmdOK_Click(object sender, EventArgs e) { SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN(); //¹ýÂËÌõ¼þDlg string sDlgWhere = ""; ; sDlgWhere = sDlgWhere + "," + DBUtility.ClsPub.isLong(txtHSource.Tag); sDlgWhere = sDlgWhere + ",'" + dtpHBDate.Value.ToShortDateString() + "'"; sDlgWhere = sDlgWhere + ",'" + dtpHEDate.Value.ToShortDateString() + "'"; sDlgWhere = sDlgWhere + "," + DBUtility.ClsPub.isLong(txtWorktimes.Text).ToString(); if (sDlgWhere.Trim().Length > 0) { sDlgWhere = sDlgWhere.Substring(1, sDlgWhere.Length - 1); } //²»ÄÜ´óÓÚ255 if (dtpHBDate.Value.AddDays(255) < dtpHEDate.Value) { MessageBox.Show("ÈÕÆÚ²î²»ÄÜ´óÓÚ255Ì죡"); return; } // string sErr = ""; SubCn.RunProcReturn("exec h_p_Gy_InsertPlanShifts_WW " + sDlgWhere, "Gy_Czygl", ref sErr); if (sErr.Trim() == "") { MessageBox.Show("Ö´Ðгɹ¦£¡"); } else { MessageBox.Show("Ö´ÐÐʧ°Ü£¡"+sErr); } } private void cmdCanal_Click(object sender, EventArgs e) { this.Close(); } private void Gy_WorkTimesWWDlg_Load(object sender, EventArgs e) { DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View(); if (oSource.GetInfoByID(HSourceID)) { txtHSource.Tag = oSource.omodel.HItemID.ToString(); txtHSource.Text = oSource.omodel.HName; } else { txtHSource.Tag = "0"; txtHSource.Text = ""; } } } }