private void ShowInfo(int _id) { BLL.CostItem bll = new BLL.CostItem(); Model.CostItem model = bll.GetModel(_id); txtName.Text = model.Name; txtSortCode.Text = model.SortCode.ToString(); }
private bool DoEdit(int _id) { bool result = false; BLL.CostItem bll = new BLL.CostItem(); Model.CostItem model = bll.GetModel(_id); model.Name = txtName.Text.Trim(); model.SortCode = Utils.StrToInt(txtSortCode.Text.Trim(), 0); if (bll.Update(model)) { AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改出车费用项:" + model.Name); //记录日志 result = true; } return(result); }
private bool DoEdit(int _id) { bool result = false; BLL.CostItem bll = new BLL.CostItem(); Model.CostItem model = bll.GetModel(_id); model.Name = txtName.Text.Trim(); model.SortCode = Utils.StrToInt(txtSortCode.Text.Trim(), 0); if (bll.Update(model)) { AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改出车费用项:" + model.Name); //记录日志 result = true; } return result; }
private void ShowInfo(int _id) { BLL.CostItem bll = new BLL.CostItem(); Model.CostItem model = bll.GetModel(_id); txtName.Text = model.Name; txtSortCode.Text = model.SortCode.ToString(); }