Esempio n. 1
0
        public List <R_WO_KP_Repalce> GetWoRepalceKpBySkuPartno(string Sku, string Partno, string ReplaceKp, OleExec DB)
        {
            List <R_WO_KP_Repalce> ret = new List <R_WO_KP_Repalce>();
            string  strSql             = $@" select a.* from R_WO_KP_Repalce a,r_wo_base b where a.wo=b.workorderno and b.skuno='{Sku}' and a.partno='{Partno}' and a.repalcepartno='{ReplaceKp}' ";
            DataSet res = DB.RunSelect(strSql);

            for (int i = 0; i < res.Tables[0].Rows.Count; i++)
            {
                Row_R_WO_KP_Repalce R = new Row_R_WO_KP_Repalce(this.DataInfo);
                R.loadData(res.Tables[0].Rows[i]);
                ret.Add(R.GetDataObject());
            }
            return(ret);
        }
Esempio n. 2
0
        public List <R_WO_KP_Repalce> GetWoRepalceKP(string WO, OleExec DB)
        {
            List <R_WO_KP_Repalce> ret = new List <R_WO_KP_Repalce>();
            string  strSql             = $@"select * from R_WO_KP_Repalce where wo = '{WO}'";
            DataSet res = DB.RunSelect(strSql);

            for (int i = 0; i < res.Tables[0].Rows.Count; i++)
            {
                Row_R_WO_KP_Repalce R = new Row_R_WO_KP_Repalce(this.DataInfo);
                //(Row_R_WO_KP_Repalce)this.ConstructRow(res.Tables[0].Rows[i]);
                R.loadData(res.Tables[0].Rows[i]);

                ret.Add(R.GetDataObject());
            }
            return(ret);
        }