private bool DoEdit(int _id) { bool result = false; ax_depot_category model = new ax_depot_category(); if (model.Exists(txttitle.Text.Trim(), _id)) { JscriptMsg(this.Page, "您输入的发货仓库名称已经存在,请检查!", "", "Error"); return(false); } model.GetModel(_id); model.title = txttitle.Text.Trim(); model.sort_id = int.Parse(txtSortId.Text.Trim()); model.remark = txtremark.Text.Trim(); if (model.Update()) { AddAdminLog("修改", "修改发货仓库:" + txttitle.Text); //记录日志 result = true; } return(result); }
private bool DoAdd() { ax_depot_category model = new ax_depot_category(); if (model.Exists(txttitle.Text.Trim())) { JscriptMsg(this.Page, "您输入的发货仓库名称已经存在,请检查!", "", "Error"); return(false); } model.title = txttitle.Text.Trim(); model.sort_id = int.Parse(txtSortId.Text.Trim()); model.remark = txtremark.Text.Trim(); if (model.Add() > 0) { AddAdminLog("添加", "添加发货仓库:" + txttitle.Text); //记录日志 return(true); } return(false); }