public void AddSMTLine(SmtctInfo item) { try { mbRepository.AddSmtctInfo(item); } catch (Exception) { throw; } }
public void UpdateLotSMTLine(SmtctInfo item, SmtctInfo cond) { try { mbRepository.UpdateSmtctInfo(item, cond); } catch (Exception ee) { logger.Error(ee.Message); throw ee; } }
public void RemoveSMTLine(SmtctInfo item) { try { mbRepository.DeleteSmtctInfo(item); } catch (Exception ee) { logger.Error(ee.Message); throw ee; } }
public IList<SmtctInfo> GetAllSMTLineItems(string line) { IList<SmtctInfo> dataLst = new List<SmtctInfo>(); try { SmtctInfo cond = new SmtctInfo(); cond.line = line; dataLst = mbRepository.GetSmtctInfoList(cond); } catch (Exception ee) { logger.Error(ee.Message); throw ee; } return dataLst; }
private SmtctInfo getSmtctInfo(string line, string mode, decimal rate, double speed, string remark) { SmtctInfo e = new SmtctInfo(); e.line = line; e.family = mode; e.ct = rate; e.optRate = speed; e.remark = remark; e.editor = UserId; return e; }
protected void Delete_ServerClick(Object sender, EventArgs e) { try { IList<SmtctInfo> lstSmtctInfo = null; SmtctInfo deleteItem = new SmtctInfo(); // getSmtctInfo(string.Empty, string.Empty, 0, 0, string.Empty); string oldFamily = this.CmbMaintainLineForSMT.InnerDropDownList.SelectedValue;//this.hidFamily.Value; //deleteItem.line = oldFamily; //deleteItem.family = this.hidMode.Value; deleteItem.id = int.Parse(this.hidDeleteID.Value); iSMTLineSpeed.RemoveSMTLine(deleteItem); this.CmbMaintainLineForSMT.refresh(); this.CmbMaintainLineForSMT.InnerDropDownList.SelectedValue = oldFamily; lstSmtctInfo = iSMTLineSpeed.GetAllSMTLineItems(oldFamily); bindTable(lstSmtctInfo, DEFAULT_ROWS); } catch (FisException ex) { showErrorMessage(ex.mErrmsg); bindTable(null, DEFAULT_ROWS); //this.hidRecordCount.Value = "0"; } catch (Exception ex) { showErrorMessage(ex.Message); bindTable(null, DEFAULT_ROWS); //this.hidRecordCount.Value = "0"; } finally { hideWait(); } }
protected void Save_ServerClick(Object sender, EventArgs e) { string msgHasExistRecord = GetLocalResourceObject(Pre + "_msgHasExistRecord").ToString(); try { IList<SmtctInfo> lstSmtctInfo = null; string family = this.hidFamily2.Value; decimal ct = decimal.Parse( this.txtSpeed.Value.Trim()); float oprate = float.Parse(this.txtRate.Value.Trim()); string remark = this.txtOther.Value.Trim(); string oldLine = this.CmbMaintainLineForSMT.InnerDropDownList.SelectedValue;//this.hidFamily.Value; string id = this.hidDeleteID.Value; SmtctInfo SmtctNew = null; SmtctInfo SmtctCond = new SmtctInfo(); gFamily = family; SmtctCond.id = int.Parse(this.hidDeleteID.Value); SmtctNew = getSmtctInfo(oldLine, family, ct, oprate, remark); iSMTLineSpeed.UpdateLotSMTLine(SmtctNew,SmtctCond); this.CmbMaintainLineForSMT.refresh(); this.CmbMaintainLineForSMT.InnerDropDownList.SelectedValue = oldLine; lstSmtctInfo = iSMTLineSpeed.GetAllSMTLineItems(oldLine); bindTable(lstSmtctInfo, DEFAULT_ROWS); ScriptManager.RegisterStartupScript(this.updatePanel, typeof(System.Object), "saveUpdate", "AddUpdateComplete('" + id + "');", true); hideWait(); } catch (FisException ex) { showErrorMessage(ex.mErrmsg); return; //bindTable(null, DEFAULT_ROWS); } catch (Exception ex) { showErrorMessage(ex.Message); return; //bindTable(null, DEFAULT_ROWS); //this.hidRecordCount.Value = "0"; } finally { // ScriptManager.RegisterStartupScript(this.Page, typeof(System.Object), "resetTableHeight", "resetTableHeight();", true); // hideWait(); } }