Exemple #1
0
        public static List <R_BACKFLUSH_HISTORY> DataAdapert(DataSet data, bool MulValue)
        {
            R_BACKFLUSH_HISTORY        obj  = new R_BACKFLUSH_HISTORY();
            List <R_BACKFLUSH_HISTORY> retL = new List <R_BACKFLUSH_HISTORY>();

            for (int i = 0; i < data.Tables[0].Rows.Count; i++)
            {
                obj = new R_BACKFLUSH_HISTORY();
                if (data.Tables[0].Rows[i]["WORKORDERNO"] != System.DBNull.Value)
                {
                    obj.WORKORDERNO = (System.String)data.Tables[0].Rows[i]["WORKORDERNO"];
                }
                if (data.Tables[0].Rows[i]["SKUNO"] != System.DBNull.Value)
                {
                    obj.SKUNO = (System.String)data.Tables[0].Rows[i]["SKUNO"];
                }
                if (data.Tables[0].Rows[i]["SAP_STATION"] != System.DBNull.Value)
                {
                    obj.SAP_STATION = (System.String)data.Tables[0].Rows[i]["SAP_STATION"];
                }
                if (data.Tables[0].Rows[i]["WORKORDER_QTY"] != System.DBNull.Value)
                {
                    obj.WORKORDER_QTY = (System.Decimal)data.Tables[0].Rows[i]["WORKORDER_QTY"];
                }
                if (data.Tables[0].Rows[i]["BACKFLUSH_QTY"] != System.DBNull.Value)
                {
                    obj.BACKFLUSH_QTY = (System.Decimal)data.Tables[0].Rows[i]["BACKFLUSH_QTY"];
                }
                if (data.Tables[0].Rows[i]["SFC_QTY"] != System.DBNull.Value)
                {
                    obj.SFC_QTY = (System.Decimal)data.Tables[0].Rows[i]["SFC_QTY"];
                }
                if (data.Tables[0].Rows[i]["DIFF_QTY"] != System.DBNull.Value)
                {
                    obj.DIFF_QTY = (System.Decimal)data.Tables[0].Rows[i]["DIFF_QTY"];
                }
                if (data.Tables[0].Rows[i]["SFC_STATION"] != System.DBNull.Value)
                {
                    obj.SFC_STATION = (System.String)data.Tables[0].Rows[i]["SFC_STATION"];
                }
                if (data.Tables[0].Rows[i]["HAND_QTY"] != System.DBNull.Value)
                {
                    obj.HAND_QTY = (System.Decimal)data.Tables[0].Rows[i]["HAND_QTY"];
                }
                if (data.Tables[0].Rows[i]["LAST_SFC_QTY"] != System.DBNull.Value)
                {
                    obj.LAST_SFC_QTY = (System.Decimal)data.Tables[0].Rows[i]["LAST_SFC_QTY"];
                }
                if (data.Tables[0].Rows[i]["DIFF_QTY1"] != System.DBNull.Value)
                {
                    obj.DIFF_QTY1 = (System.Decimal)data.Tables[0].Rows[i]["DIFF_QTY1"];
                }
                if (data.Tables[0].Rows[i]["DIFF_QTY2"] != System.DBNull.Value)
                {
                    obj.DIFF_QTY2 = (System.Decimal)data.Tables[0].Rows[i]["DIFF_QTY2"];
                }
                if (data.Tables[0].Rows[i]["HISTORY_HAND_QTY"] != System.DBNull.Value)
                {
                    obj.HISTORY_HAND_QTY = (System.Decimal)data.Tables[0].Rows[i]["HISTORY_HAND_QTY"];
                }
                if (data.Tables[0].Rows[i]["MRB_QTY"] != System.DBNull.Value)
                {
                    obj.MRB_QTY = (System.Decimal)data.Tables[0].Rows[i]["MRB_QTY"];
                }
                if (data.Tables[0].Rows[i]["REC_TYPE"] != System.DBNull.Value)
                {
                    obj.REC_TYPE = (System.String)data.Tables[0].Rows[i]["REC_TYPE"];
                }
                if (data.Tables[0].Rows[i]["BACK_DATE"] != System.DBNull.Value)
                {
                    obj.BACK_DATE = (System.DateTime)data.Tables[0].Rows[i]["BACK_DATE"];
                }
                if (data.Tables[0].Rows[i]["RESULT"] != System.DBNull.Value)
                {
                    obj.RESULT = (System.String)data.Tables[0].Rows[i]["RESULT"];
                }
                if (data.Tables[0].Rows[i]["TIMES"] != System.DBNull.Value)
                {
                    obj.TIMES = (System.Decimal)data.Tables[0].Rows[i]["TIMES"];
                }
                if (data.Tables[0].Rows[i]["TOSAP"] != System.DBNull.Value)
                {
                    obj.TOSAP = (System.String)data.Tables[0].Rows[i]["TOSAP"];
                }
                obj.AcceptChange();
                retL.Add(obj);
            }
            return(retL);
        }
Exemple #2
0
        public static R_BACKFLUSH_HISTORY DataAdapert(DataSet data)
        {
            R_BACKFLUSH_HISTORY obj = new R_BACKFLUSH_HISTORY();

            if (data.Tables[0].Rows[0]["WORKORDERNO"] != System.DBNull.Value)
            {
                obj.WORKORDERNO = (System.String)data.Tables[0].Rows[0]["WORKORDERNO"];
            }
            if (data.Tables[0].Rows[0]["SKUNO"] != System.DBNull.Value)
            {
                obj.SKUNO = (System.String)data.Tables[0].Rows[0]["SKUNO"];
            }
            if (data.Tables[0].Rows[0]["SAP_STATION"] != System.DBNull.Value)
            {
                obj.SAP_STATION = (System.String)data.Tables[0].Rows[0]["SAP_STATION"];
            }
            if (data.Tables[0].Rows[0]["WORKORDER_QTY"] != System.DBNull.Value)
            {
                obj.WORKORDER_QTY = (System.Decimal)data.Tables[0].Rows[0]["WORKORDER_QTY"];
            }
            if (data.Tables[0].Rows[0]["BACKFLUSH_QTY"] != System.DBNull.Value)
            {
                obj.BACKFLUSH_QTY = (System.Decimal)data.Tables[0].Rows[0]["BACKFLUSH_QTY"];
            }
            if (data.Tables[0].Rows[0]["SFC_QTY"] != System.DBNull.Value)
            {
                obj.SFC_QTY = (System.Decimal)data.Tables[0].Rows[0]["SFC_QTY"];
            }
            if (data.Tables[0].Rows[0]["DIFF_QTY"] != System.DBNull.Value)
            {
                obj.DIFF_QTY = (System.Decimal)data.Tables[0].Rows[0]["DIFF_QTY"];
            }
            if (data.Tables[0].Rows[0]["SFC_STATION"] != System.DBNull.Value)
            {
                obj.SFC_STATION = (System.String)data.Tables[0].Rows[0]["SFC_STATION"];
            }
            if (data.Tables[0].Rows[0]["HAND_QTY"] != System.DBNull.Value)
            {
                obj.HAND_QTY = (System.Decimal)data.Tables[0].Rows[0]["HAND_QTY"];
            }
            if (data.Tables[0].Rows[0]["LAST_SFC_QTY"] != System.DBNull.Value)
            {
                obj.LAST_SFC_QTY = (System.Decimal)data.Tables[0].Rows[0]["LAST_SFC_QTY"];
            }
            if (data.Tables[0].Rows[0]["DIFF_QTY1"] != System.DBNull.Value)
            {
                obj.DIFF_QTY1 = (System.Decimal)data.Tables[0].Rows[0]["DIFF_QTY1"];
            }
            if (data.Tables[0].Rows[0]["DIFF_QTY2"] != System.DBNull.Value)
            {
                obj.DIFF_QTY2 = (System.Decimal)data.Tables[0].Rows[0]["DIFF_QTY2"];
            }
            if (data.Tables[0].Rows[0]["HISTORY_HAND_QTY"] != System.DBNull.Value)
            {
                obj.HISTORY_HAND_QTY = (System.Decimal)data.Tables[0].Rows[0]["HISTORY_HAND_QTY"];
            }
            if (data.Tables[0].Rows[0]["MRB_QTY"] != System.DBNull.Value)
            {
                obj.MRB_QTY = (System.Decimal)data.Tables[0].Rows[0]["MRB_QTY"];
            }
            if (data.Tables[0].Rows[0]["REC_TYPE"] != System.DBNull.Value)
            {
                obj.REC_TYPE = (System.String)data.Tables[0].Rows[0]["REC_TYPE"];
            }
            if (data.Tables[0].Rows[0]["BACK_DATE"] != System.DBNull.Value)
            {
                obj.BACK_DATE = (System.DateTime)data.Tables[0].Rows[0]["BACK_DATE"];
            }
            if (data.Tables[0].Rows[0]["RESULT"] != System.DBNull.Value)
            {
                obj.RESULT = (System.String)data.Tables[0].Rows[0]["RESULT"];
            }
            if (data.Tables[0].Rows[0]["TIMES"] != System.DBNull.Value)
            {
                obj.TIMES = (System.Decimal)data.Tables[0].Rows[0]["TIMES"];
            }
            if (data.Tables[0].Rows[0]["TOSAP"] != System.DBNull.Value)
            {
                obj.TOSAP = (System.String)data.Tables[0].Rows[0]["TOSAP"];
            }
            obj.AcceptChange();
            return(obj);
        }