yangle
2022-06-30 1cf37e52dcefd6bbf567818b50e16f36c7fae84c
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
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Pub_Class;
using Model;
using System.Windows.Forms;
using SQLHelper;
 
namespace BLL
{
    public class ClsK3Pub_BLL
    {
        /// <summary>
        /// µÃµ½½ðµûK3Åú´Î
        /// </summary>
        /// <returns></returns>
        public static string Fun_GetBatchNo_K3(Int64 HMaterID,string VNum)
        {
            try
            {
                ClsCNK3 oCn = new ClsCNK3();
                DataSet ds;
                string sBatchNo = "";
                switch (VNum)
                {
                    case "12.0": 
                        //ɾ³ýÖ÷±í
                        ds=oCn.RunProcReturn("exec h_p_Kf_GetBatchNo_K3 " + HMaterID.ToString(),"xt_xtgnb");
                        if (ds == null || ds.Tables[0].Rows.Count == 0)
                        {
                            return "";
                        }
                        sBatchNo = ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBatchNo"]);
                        break;
                    case "12.1":
                        //ɾ³ýÖ÷±í
                        ds = oCn.RunProcReturn("exec h_p_Kf_GetBatchNo_K3 " + HMaterID.ToString(), "xt_xtgnb");
                        if (ds == null || ds.Tables[0].Rows.Count == 0)
                        {
                            return "";
                        }
                        sBatchNo = ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBatchNo"]);
                        break;
                    default:
                        sBatchNo = "";
                        break;
                }
                return sBatchNo;
            }
            catch (Exception e)
            {
                return "";
            }
        }
    }
}