public IList<IMES.DataModel.CeldataDef> GetAllCeldatas() { IList<CeldataDef> CeldataItems = new List<CeldataDef>(); try { IList<CeldataInfo> CeldataVos = itemRepository.GetAllCeldatas(); if (CeldataVos != null) { foreach (CeldataInfo vo in CeldataVos) { CeldataDef def = new CeldataDef(); def.platform = vo.platform; def.productSeriesName = vo.productSeriesName; def.category = vo.category; def.grade = vo.grade; def.tec = vo.tec; def.zmod = vo.zmod; def.cdt = vo.cdt.ToString("yyyy-MM-dd hh:mm:ss"); def.editor = vo.editor; CeldataItems.Add(def); } } } catch(Exception ee) { logger.Error(ee.Message); throw; } return CeldataItems; }
protected void btnAdd_ServerClick(object sender, EventArgs e) { CeldataDef def = new CeldataDef(); def.platform = this.ttPlatform.Text.Trim(); def.productSeriesName = this.ttProdSName.Text.Trim(); def.category = this.ttCategory.Text.Trim(); def.grade = Convert.ToInt32(this.ttGrade.Text.Trim()); def.tec = this.ttTEC.Text.Trim(); def.zmod = this.ttZMOD.Text.Trim(); def.editor = this.HiddenUserName.Value.Trim(); System.DateTime Cdt = DateTime.Now; string timeStr = Cdt.ToString(); def.cdt = timeStr; string zmod = ""; try { //调用添加的方法 相同的key时需要抛出异常... zmod = iceldata.AddCeldataItem(def); } catch (FisException fex) { showErrorMessage(fex.mErrmsg); return; } catch (System.Exception ex) { showErrorMessage(ex.Message); return; } //按照ac adaptor list加载表格中的数据 //... showListByCeldataList(); this.updatePanel2.Update(); // string assemblyId = replaceSpecialChart(adaptor.assemb); ScriptManager.RegisterStartupScript(this.updatePanel, typeof(System.Object), "saveUpdate", "resetTableHeight();AddUpdateComplete('" + zmod + "');HideWait();", true); }