IList<PAKitLocDef> IPAKitLoc.GetPAKitlocByPdLine(string pdline) { IList<PAKitLocDef> conditionResult=new List<PAKitLocDef>(); if(!String.IsNullOrEmpty(pdline)) { try { IList<PAKitLoc> result = itemRepository.GetPAKitlocByPdLine(pdline); if(result!=null) { foreach(PAKitLoc loc in result) { PAKitLocDef def=new PAKitLocDef(); def.id=loc.id; def.location=loc.location; def.partNo=loc.partNo; def.pdLine=loc.pdLine; def.station=loc.station; def.Descr=loc.descr; def.editor=loc.editor; def.cdt=loc.cdt.ToString("yyyy-MM-dd HH:mm:ss"); def.udt = loc.udt.ToString("yyyy-MM-dd HH:mm:ss"); conditionResult.Add(def); } } } catch(Exception ee) { logger.Error(ee.Message); throw ee; } } return conditionResult; }
protected void btnSave_ServerClick(object sender, EventArgs e) { //init newPAKitLoc string pdline = this.cmbPdLine.InnerDropDownList.SelectedValue.Trim(); string partno = this.ddlPartNo.InnerDropDownList.SelectedValue.Trim(); string descr = this.ddlDescr.InnerDropDownList.SelectedValue.Trim(); string station = this.ddlStation.InnerDropDownList.SelectedValue.Trim(); string location = this.ttLocation.Text.Trim(); PAKitLocDef newDel = new PAKitLocDef(); newDel.pdLine = pdline; newDel.partNo = partno; newDel.Descr = descr; newDel.station = station; newDel.location = location; newDel.editor = this.HiddenUserName.Value.Trim(); newDel.id = Convert.ToInt32(this.HiddenSelectedId.Value.Trim()); string itemId = this.HiddenSelectedId.Value.Trim(); try { iPAKitLoc.UpdatePAKitLoc(newDel); } catch (FisException fe) { showErrorMessage(fe.mErrmsg); return; } catch (Exception ee) { showErrorMessage(ee.Message); return; } showListByGradeList(); this.updatePanel2.Update(); ScriptManager.RegisterStartupScript(this.updatePanel2, typeof(System.Object), "saveUpdate", "AddUpdateComplete('" + itemId + "');HideWait();", true); }
protected void btnAdd_ServerClick(object sender, EventArgs e) { PAKitLocDef pak = new PAKitLocDef(); pak.pdLine = this.cmbPdLine.InnerDropDownList.SelectedValue.Trim(); pak.partNo = this.ddlPartNo.InnerDropDownList.SelectedValue.Trim(); pak.Descr = this.ddlDescr.InnerDropDownList.SelectedValue.Trim(); pak.station = this.ddlStation.InnerDropDownList.SelectedValue.Trim(); pak.location = this.ttLocation.Text.Trim(); pak.editor = this.HiddenUserName.Value.Trim(); string itemId = ""; try { itemId = iPAKitLoc.AddPAKitLoc(pak); } catch (FisException fex) { showErrorMessage(fex.mErrmsg); return; } catch (Exception ex) { showErrorMessage(ex.Message); return; } showListByGradeList(); itemId = replaceSpecialChart(itemId); this.updatePanel2.Update(); ScriptManager.RegisterStartupScript(this.updatePanel2, typeof(System.Object), "saveUpdate", "AddUpdateComplete('" + itemId + "');HideWait();", true); }
protected void btnDelete_ServerClick(object sender, EventArgs e) { string id = this.HiddenSelectedId.Value.Trim(); try { PAKitLocDef def = new PAKitLocDef(); def.id = Convert.ToInt32(id); iPAKitLoc.DeletePAKitLoc(def); } catch (FisException fex) { showErrorMessage(fex.mErrmsg); return; } catch (Exception ex) { showErrorMessage(ex.Message); return; } showListByGradeList(); this.updatePanel2.Update(); ScriptManager.RegisterStartupScript(this.updatePanel2, typeof(System.Object), "saveUpdate", "DeleteComplete();HideWait();", true); }