Exemplo n.º 1
0
        public ProductParamInfo GetProductParamByITEM_CD(string ITEM_CD)
        {
            DataTable        tb   = getProductParamByITEM_CD(ITEM_CD);
            ProductParamInfo info = new ProductParamInfo();

            if (tb != null && tb.Rows.Count > 0)
            {
                info.ITEM_CD      = tb.Rows[0][1].ToString();
                info.ITEM_NM      = tb.Rows[0][2].ToString();
                info.ITEM_DESC    = tb.Rows[0][3].ToString();
                info.MODEL_CD     = tb.Rows[0][4].ToString();
                info.MODEL_NM     = tb.Rows[0][5].ToString();
                info.ITEM_COLOR   = tb.Rows[0][6].ToString();
                info.ITEM_LONG    = tb.Rows[0][7].ToString();
                info.ITEM_WIDE    = tb.Rows[0][8].ToString();
                info.LIGHT_BRIGHT = tb.Rows[0][9].ToString();
                info.QTY_FOR_CRIB = tb.Rows[0][10].ToString();
                info.QTY_FOR_TARY = tb.Rows[0][11].ToString();
                info.MO           = tb.Rows[0][12].ToString();
                info.CRT_ID       = tb.Rows[0][13].ToString();
                info.CRT_DT       = DateTime.Parse(tb.Rows[0][14].ToString());
                info.UPT_ID       = tb.Rows[0][15].ToString();
                info.UPT_DT       = DateTime.Parse(tb.Rows[0][16].ToString());

                return(info);
            }
            else
            {
                throw new Exception("执行 getProductParamByITEM_CD 查询到空值");
            }
        }
Exemplo n.º 2
0
        public List <ProductParamInfo> GetProductParams(string item_cd)
        {
            DataTable tb = ProductParamTableQuery(item_cd);

            List <ProductParamInfo> list = new List <ProductParamInfo>();

            if (tb != null && tb.Rows.Count > 0)
            {
                foreach (DataRow row in tb.Rows)
                {
                    ProductParamInfo info = new ProductParamInfo();
                    info.ITEM_CD      = row[0].ToString();
                    info.ITEM_NM      = row[1].ToString();
                    info.ITEM_DESC    = row[2].ToString();
                    info.MODEL_CD     = row[3].ToString();
                    info.MODEL_NM     = row[4].ToString();
                    info.ITEM_COLOR   = row[5].ToString();
                    info.ITEM_LONG    = row[6].ToString();
                    info.ITEM_WIDE    = row[7].ToString();
                    info.LIGHT_BRIGHT = row[8].ToString();
                    info.QTY_FOR_CRIB = row[9].ToString();
                    info.QTY_FOR_TARY = row[10].ToString();
                    info.MO           = row[11].ToString();
                    info.CRT_ID       = row[12].ToString();
                    info.CRT_DT       = DateTime.Parse(row[13].ToString());
                    info.UPT_ID       = row[14].ToString();
                    info.UPT_DT       = DateTime.Parse(row[15].ToString());

                    list.Add(info);
                }
            }
            return(list);
        }
Exemplo n.º 3
0
        public void UpdateProductParams(ProductParamInfo info)
        {
            if (!logCell)
            {
                return;
            }
            Database equipDB = dataProvider.EQUIPDataBase;

            string sql = string.Format(
                @"update C_BASE_PRODUCT_T t 
                    set
			        t.ITEM_NM = '{1}',
			        t.ITEM_DESC = '{2}',
			        t.MODEL_CD = '{3}',
                    t.MODEL_NM = '{4}',
			        t.ITEM_COLOR = '{5}',
			        t.ITEM_LONG = '{6}',
			        t.ITEM_WIDE = '{7}',
                    t.LIGHT_BRIGHT = '{8}',
			        t.QTY_FOR_CRIB = '{9}',
                    t.QTY_FOR_TARY = '{10}',
			        t.MO = '{11}',
			        t.UPT_ID = '{12}',
			        t.UPT_DT = '{13}'
                    where t.ITEM_CD = '{0}'"
                , info.ITEM_CD, info.ITEM_NM, info.ITEM_DESC, info.MODEL_CD, info.MODEL_NM, info.ITEM_COLOR
                , info.ITEM_LONG, info.ITEM_WIDE, info.LIGHT_BRIGHT, info.QTY_FOR_CRIB, info.QTY_FOR_TARY, info.MO
                , info.UPT_ID, info.UPT_DT.ToString()
                );

            equipDB.ExecuteScalar(CommandType.Text, sql);
        }
Exemplo n.º 4
0
        //
        public void InsertProductParamsInfo(ProductParamInfo info)
        {
            Database equipDB = dataProvider.EQUIPDataBase;

            string sql = string.Format(@"insert C_BASE_PRODUCT_T (ITEM_CD, ITEM_NM, ITEM_DESC, MODEL_CD, MODEL_NM, ITEM_COLOR, ITEM_LONG,ITEM_WIDE,LIGHT_BRIGHT,QTY_FOR_CRIB,QTY_FOR_TARY,MO,CRT_ID,CRT_DT,UPT_ID,UPT_DT) values('{0}', '{1}', '{2}', '{3}', '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}', '{13}', '{14}', '{15}'); "
                                       , info.ITEM_CD, info.ITEM_NM, info.ITEM_DESC, info.MODEL_CD, info.MODEL_NM, info.ITEM_COLOR, info.ITEM_LONG, info.ITEM_WIDE, /*info.LIGHT_BRIGHT*/ 0, info.QTY_FOR_CRIB, info.QTY_FOR_TARY,
                                       info.MO, info.CRT_ID, info.CRT_DT.ToString(), info.UPT_ID, info.UPT_DT.ToString());

            equipDB.ExecuteNonQuery(CommandType.Text, sql);
        }