public int getLearningByCurveName(string CurveName) { string sql = @"SELECT id FROM CureNames WHERE modulusName =@CurveName"; int namesid = -1; SqlParameter[] ps = { new SqlParameter("CurveName", CurveName) }; DataTable dt = IEBOM_SqlHelper.ExcuteTable(sql, ps); if (dt.Rows.Count > 0) { namesid = Convert.ToInt32(dt.Rows[0][0].ToString()); } return(namesid); }
public List <string> getIEVersions(string styleNumber) { List <string> versions = new List <string>(); string sql = @"SELECT IEBomVersion FROM dbo.IEBomBase WHERE IEBomStyleName=@styleNumber"; SqlParameter[] paras = { new SqlParameter("@styleNumber", styleNumber) }; DataTable dt = IEBOM_SqlHelper.ExcuteTable(sql, paras); if (dt != null && dt.Rows.Count > 0) { } List <string> IEVersions return }
public DataTable getStandardModulusByCurveNameID(int CurveNameID) { string sql = @"SELECT CureNamesID, CArea, Clevel, CsingleMinute, Cratio, COneday, CTwoDay, CThreeDay, CFourDay, CFiveDay, CSixDay, CSevenDay, CEightDay, CNineDay, CTenDay, CElevenDay, CTwelveDay, CThirteenDay, CFourteenDay, Creator, CreateDate, modiyDate, modiyed, isNewStyle, isDel FROM dbo.StandardModulus WHERE CureNamesID = @CurveNameID AND isdel IS NULL;"; SqlParameter[] ps = { new SqlParameter("CurveNameID", CurveNameID) }; DataTable dt = IEBOM_SqlHelper.ExcuteTable(sql, ps); return(dt); }
public DataTable getAllMachineTypes() { string sql = @"SELECT machineClass, MachineName, machineNameEN, machinesMark, CreateDate, Creator, modify, modifor, ismachinesStatus FROM machinetypes ORDER BY ismachinesStatus, machineClass; "; DataTable dt = IEBOM_SqlHelper.ExcuteTable(sql); return(dt); /* * * List<Machines> machinesLists = null; * * if (dt != null && dt.Rows.Count > 0) * { * DataRow dr = dt.Rows[0]; * machinesLists = new List<Machines>(); * foreach (DataRow row in dt.Rows) * { * MODEL.Machines c = new MODEL.Machines(); * dataToMachines(row, c); * machinesLists.Add(c); * } * } * * return machinesLists; */ }
public List <StyleLearingCurve> getCurveNames() { string sql = @"SELECT id, modulusName, isNewStyle, Remark FROM dbo.CureNames WHERE isDel = 0;"; List <StyleLearingCurve> lists = new List <StyleLearingCurve>(); DataTable modulusNames = IEBOM_SqlHelper.ExcuteTable(sql); if (modulusNames.Rows.Count > 0) { foreach (DataRow row in modulusNames.Rows) { StyleLearingCurve c = new StyleLearingCurve(); cModulusNames(row, c); lists.Add(c); } } return(lists); }