1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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 = "";
            }
        }
 
 
 
    }
}