public void DeleteSelectedPAKLabelLightNo(PakChnTwLightInfo LightNoItem) { try { itemRepository.DeletePakChnTwLightInfo(LightNoItem); } catch (FisException fe) { logger.Error(fe.Message); throw fe; } catch(Exception e) { logger.Error(e.Message); throw e; } return ; }
public IList<PakChnTwLightInfo> GetAllPAKLabelLightNo() { IList<PakChnTwLightInfo> PakChnTwLightLst = new List<PakChnTwLightInfo>(); PakChnTwLightInfo NewLightItem =new PakChnTwLightInfo(); try { PakChnTwLightLst = (IList<PakChnTwLightInfo>)itemRepository.GetPakChnTwLightInfoList(NewLightItem); } catch(FisException fe) { logger.Error(fe.Message); throw fe; } catch(Exception e) { logger.Error(e.Message); throw e; } return PakChnTwLightLst; }
public void UpdateSelectedPAKLabelLightNo(PakChnTwLightInfo LightNoItem) { try { PakChnTwLightInfo SetLightItem =new PakChnTwLightInfo(); PakChnTwLightInfo ConLightItem =new PakChnTwLightInfo(); SetLightItem.lightNo = LightNoItem.lightNo; SetLightItem.model = LightNoItem.model; SetLightItem.partNo = LightNoItem.partNo; SetLightItem.descr = LightNoItem.descr; SetLightItem.type = LightNoItem.type; SetLightItem.editor = LightNoItem.editor; SetLightItem.udt = DateTime.Now; ConLightItem.id = LightNoItem.id; itemRepository.UpdatePakChnTwLightInfo(SetLightItem, ConLightItem); } catch(Exception e) { logger.Error(e.Message); throw e; } return ; }
public int AddSelectedPAKLabelLightNo(PakChnTwLightInfo LightNoItem) { PakChnTwLightInfo NewLightItem = new PakChnTwLightInfo(); NewLightItem.lightNo = LightNoItem.lightNo; NewLightItem.model = LightNoItem.model; NewLightItem.partNo = LightNoItem.partNo; NewLightItem.type = LightNoItem.type; NewLightItem.descr = LightNoItem.descr; IList<PakChnTwLightInfo> PakChnTwLightLst = new List<PakChnTwLightInfo>(); int getID = -1; try { itemRepository.InsertPakChnTwLightInfo(LightNoItem); getID = LightNoItem.id; PakChnTwLightLst = (IList<PakChnTwLightInfo>)itemRepository.GetPakChnTwLightInfoList(NewLightItem); if (PakChnTwLightLst != null && PakChnTwLightLst.Count != 0) { getID = PakChnTwLightLst[0].id; } } catch(Exception e) { logger.Error(e.Message); throw e; } return getID; }
//删除处理 protected void btnDelete_ServerClick(Object sender, EventArgs e) { string itemId = this.itemId.Value.Trim(); PakChnTwLightInfo item = new PakChnTwLightInfo(); item.id = int.Parse(itemId);//Convert.ToInt32(itemId); try { iPAKLabelLightNo.DeleteSelectedPAKLabelLightNo(item);//.DeleteICASAInfo(itemId); } catch (FisException ex) { ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "DealHideWait", "DealHideWait();", true); showErrorMessage(ex.mErrmsg); return; } catch (Exception ex) { ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "DealHideWait", "DealHideWait();", true); //show error showErrorMessage(ex.Message); return; } ShowPakChnTwLightInfo(); this.updatePanel2.Update(); ScriptManager.RegisterStartupScript(this.updatePanel2, typeof(System.Object), "saveUpdate", "resetTableHeight();DeleteComplete();DealHideWait();", true); }
protected void btnSave_ServerClick(Object sender, EventArgs e) { int lightno; lightno = int.Parse(this.txtLightNo.Text.Trim()); string itemId = this.itemId.Value.Trim(); PakChnTwLightInfo item = new PakChnTwLightInfo(); item.model = this.txtModel.Text.Trim().ToUpper(); //ITC-1361-0103 ITC210012 2012-3-6 item.partNo = this.txtPartNo.Text.Trim(); item.type = this.txtType.Text.Trim(); item.descr = this.ddlLightDescr.InnerDropDownList.SelectedValue; item.lightNo = lightno.ToString();// this.txtLightNo.Text.Trim(); item.editor = this.HiddenUserName.Value; item.udt = DateTime.Now; item.id = int.Parse(itemId); try { iPAKLabelLightNo.UpdateSelectedPAKLabelLightNo(item);//.UpdateICASAInfo(item, itemId); } catch (FisException ex) { ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "DealHideWait", "DealHideWait();", true); showErrorMessage(ex.mErrmsg); return; } catch (Exception ex) { ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "DealHideWait", "DealHideWait();", true); //show error showErrorMessage(ex.Message); return; } //读取并显示列表信息 ShowPakChnTwLightInfo(); itemId = replaceSpecialChart(itemId); this.updatePanel2.Update(); ScriptManager.RegisterStartupScript(this.updatePanel2, typeof(System.Object), "saveUpdate", "resetTableHeight();AddUpdateComplete('" + itemId + "');DealHideWait();", true); }
//添加处理 protected void btnAdd_ServerClick(Object sender, EventArgs e) { PakChnTwLightInfo item = new PakChnTwLightInfo(); int id; string strID; int lightNo; lightNo = int.Parse(this.txtLightNo.Text.Trim()); item.model = this.txtModel.Text.Trim().ToUpper(); ; item.partNo = this.txtPartNo.Text.Trim(); item.type = this.txtType.Text.Trim(); item.descr = this.ddlLightDescr.InnerDropDownList.SelectedValue; item.lightNo = lightNo.ToString();//this.txtLightNo.Text.Trim(); item.editor = this.HiddenUserName.Value; item.cdt = DateTime.Now; item.udt = DateTime.Now; IList<PakChnTwLightInfo> PakChnTwLightLst = new List<PakChnTwLightInfo>(); try { id = iPAKLabelLightNo.AddSelectedPAKLabelLightNo(item);//.AddICASAInfo(item); } catch (FisException ex) { ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "DealHideWait", "DealHideWait();", true); showErrorMessage(ex.mErrmsg); return; } catch (Exception ex) { ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "DealHideWait", "DealHideWait();", true); //show error showErrorMessage(ex.Message); return; } //读取并显示列表信息 ShowPakChnTwLightInfo(); strID = id.ToString(); strID = replaceSpecialChart(strID); this.updatePanel2.Update(); ScriptManager.RegisterStartupScript(this.updatePanel2, typeof(System.Object), "saveUpdate", "resetTableHeight();AddUpdateComplete('" + strID + "');DealHideWait();", true); }