private void ShowInfo(int _id) { BLL.Address bll = new BLL.Address(); Model.Address model = bll.GetModel(_id); txtName.Text = model.Name; txtCode.Text = model.Code; ddlCategory.SelectedValue = model.CategoryName; }
private bool DoEdit(int _id) { bool result = false; BLL.Address bll = new BLL.Address(); Model.Address model = bll.GetModel(_id); model.Name = txtName.Text.Trim(); model.Code = string.IsNullOrEmpty(txtCode.Text.Trim()) ? model.Name : txtCode.Text.Trim(); model.CategoryName = ddlCategory.SelectedValue; if (bll.Update(model)) { AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改装卸货地址信息:" + model.Name); //记录日志 result = true; } return(result); }
private bool DoEdit(int _id) { bool result = false; BLL.Address bll = new BLL.Address(); Model.Address model = bll.GetModel(_id); model.Name = txtName.Text.Trim(); model.Code = string.IsNullOrEmpty(txtCode.Text.Trim()) ? model.Name : txtCode.Text.Trim(); model.CategoryName = ddlCategory.SelectedValue; if (bll.Update(model)) { AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改装卸货地址信息:" + model.Name); //记录日志 result = true; } return result; }