public ClassMasterModel GetByID(string plant, int ClassNo) { ClassMasterModel result = new ClassMasterModel(); string sql = string.Format(@"SELECT * FROM dbo.ucc_tqa_ClassMaster WHERE Plant = '{0}' AND ClassNo = {1}" + Environment.NewLine, plant, ClassNo); result = Repository.Instance.GetOne<ClassMasterModel>(sql); return result; }
public WorkEntry(SessionInfo _session = null, PlanningHeadModel model = null) { InitializeComponent(); this._repoRes = new ResourceRepo(); this._repoUcd = new UserCodeRepo(); this._repo = new WorkEntryRepo(); this._reRes = new ResourceRepo(); this._repoSale = new SaleOrderRepo(); this._repoCls = new ClassMasterRepo(); this.HeaderContent = new PlanningHeadModel(); this._class = new ClassMasterModel(); //Initial Session and content this.HeaderContent = new PlanningHeadModel(); epiSession = _session; if (model != null) { this.HeaderContent = model; } }