private void InitItems(string pPlanCode,string pStationCode) { StationEntity ent1 = StationFactory.GetByKey(pStationCode); WorkunitCode = ""; txtWorkUnit.Text = ent1.STATION_NAME; PlanEntity ent2 = PlanFactory.GetByKey(pPlanCode); OrderCode = ent2.ORDER_CODE; List<PlanStandardBOMEntity> lstBom = PlanStandardBOMFactory.GetByOrderCode(OrderCode); List<PlanStandardBOMEntity> lstBom1 = (from p in lstBom where p.VIRTUAL_ITEM_CODE == "X" && p.WORKUNIT_CODE == WorkunitCode select p).ToList<PlanStandardBOMEntity>(); if (lstBom1.Count == 0) { cmbVItemCode.SelectedIndex = -1; cmbVItemCode.Enabled = false; } else { cmbVItemCode.Items.Clear(); cmbVItemCode.Items.Add("总装件"); for (int i = 0; i < lstBom1.Count; i++) { cmbVItemCode.Items.Add(lstBom1[i].ITEM_CODE + "-" + lstBom1[i].ITEM_NAME); } cmbVItemCode.Enabled = true; } }
public ctrlBomItemMng(string pPlanCode, string pSn, List <SNBomTempEntity> pDS) { InitializeComponent(); stationCode = LoginInfo.StationInfo.RMES_ID; plineCode = LoginInfo.ProductLineInfo.RMES_ID; companyCode = LoginInfo.CompanyInfo.COMPANY_CODE; SN = pDS.First().SN; StationEntity ent1 = StationFactory.GetByKey(stationCode); WorkunitCode = ""; LineSideStoreEntity ent2 = LinesideStoreFactory.GetByWKUnit(companyCode, WorkunitCode); LinesideStock = ent2.STORE_CODE; dgvBom.AutoGenerateColumns = false; dgvBom.RowHeadersVisible = false; dgvBom.DataSource = pDS; }
public List <SNProcessTempEntity> GetProcessList(string CompanyCode, string PlineCode, string StationCode, string PlanCode, string SN) { //查看是否已经初始化工序临时表,如果没有进行初始化 string workunit_code = "", SQL = ""; string UserID = LoginInfo.UserInfo.USER_ID; db.Execute("call PL_INIT_PROCESS_TEMP(@0,@1,@2,@3,@4,@5)", CompanyCode, PlineCode, StationCode, PlanCode, SN, UserID); StationEntity ent_station = StationFactory.GetByKey(StationCode); //if (ent_station != null) workunit_code = ent_station.WORKUNIT_CODE; if (ent_station != null) { workunit_code = ""; } SQL = "where plan_code='" + PlanCode + "' and workunit_code='" + workunit_code + "'"; if (!string.IsNullOrWhiteSpace(SN)) { SQL += " and sn='" + SN + "'"; } SQL += " order by PROCESS_CODE"; return(db.Fetch <SNProcessTempEntity>(SQL)); }