protected void BtnAdd_Click(object sender, EventArgs e) { //判断session if (Session["User"] == null || Session["User"].ToString().Length < 1) { Response.Redirect(Request.RawUrl); } if (ValiAdd()) { DBLL.clsProductCategory ProductCategory = new DBLL.clsProductCategory(); DBLL.OptionSysDBLL option = new DBLL.OptionSysDBLL(); int _Result = ProductCategory.insert_tb_ProductCategory(ddlProductCateTreelist1.nSelectProductCategoryID, txtsProductCategoryNameCN.Text, txtsProductCategoryNameEN.Text, CKEditorControl1.Text, CKEditorControl2.Text, Session["User"].ToString(), DateTime.Now, Session["User"].ToString(), DateTime.Now, true, int.Parse(ddlnSorting.SelectedValue)); if (_Result > 0) { ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertSuccess"); ShowMsg1.Show(); Clear(); } else { ShowMsg1.InnerContent = option.GetOptionValue("FormatSetting", "CommandControl", "InsertFail"); ShowMsg1.Show(); } } else { ShowMsg1.Show(); } }