wtt
5 天以前 fc2b252f59a8f891d5d0f5d2f7a3fc6278ca3b39
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
76
77
78
79
80
81
82
83
84
85
86
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
 
namespace DAL
{
    public  class ClsSc_WorkProcInfoBoard:DBUtility.ClsXt_BaseBill
    {
        public Model.ClsSc_WorkProcInfoBoard omodel = new Model.ClsSc_WorkProcInfoBoard();
 
        public ClsSc_WorkProcInfoBoard()
        {
            base.MvarItemKeySub = "Sc_WorkProcInfoBoard";
            base.MvarItemKeySub2 = "";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub4 = "";
            base.MvarItemKey="Sc_WorkProcInfoBoard";
            base.MvarReportTitle = "产线小看板";
            base.BillType="3779"; 
        }
 
        #region 固定代码
 
        ~ClsSc_WorkProcInfoBoard()
        {
            
        }
       
        #endregion   自定义方法
        //修改单据
        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
        {
            return true;
             //
        }
        //新增单据
        public override bool AddBill(ref string sReturn)
        {
            return true;
            //
        }
        //显示单据
        public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //查询主表
                DataSet Ds ;
                Ds = oCn.RunProcReturn("Select * from Sc_WorkProcInfoBoard Where HSourceID=" + lngBillKey.ToString(), "Sc_WorkProcInfoBoard");
                if(Ds.Tables[0].Rows.Count==0)
                {
                    sReturn = "记录未找到!";
                    return false;
                }
                //赋值
                omodel.HCaption = Ds.Tables[0].Rows[0]["HCaption"].ToString().Trim();
                omodel.HDay = Ds.Tables[0].Rows[0]["HDay"].ToString().Trim();
                omodel.HWeek = Ds.Tables[0].Rows[0]["HWeek"].ToString().Trim();
                omodel.HTime = Ds.Tables[0].Rows[0]["HTime"].ToString().Trim();
                omodel.HUnitPlanQty = Ds.Tables[0].Rows[0]["HUnitPlanQty"].ToString().Trim();
                omodel.HUnitQty = Ds.Tables[0].Rows[0]["HUnitQty"].ToString().Trim();
                omodel.HUnitDiff = Ds.Tables[0].Rows[0]["HUnitDiff"].ToString().Trim();
                omodel.HUnitBadCount = Ds.Tables[0].Rows[0]["HUnitBadCount"].ToString().Trim();
                omodel.HSumBadCount = Ds.Tables[0].Rows[0]["HSumBadCount"].ToString().Trim();
                omodel.HBadRate = Ds.Tables[0].Rows[0]["HBadRate"].ToString().Trim();
                omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
                omodel.HMaterModel = Ds.Tables[0].Rows[0]["HMaterModel"].ToString().Trim();
                omodel.HSumPlanQty = Ds.Tables[0].Rows[0]["HSumPlanQty"].ToString().Trim();
                omodel.HSumQty = Ds.Tables[0].Rows[0]["HSumQty"].ToString().Trim();
                omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
                 
                sReturn = "显示单据成功!";
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                throw (e);
            }
        }
       
        
    }
 
}