コード例 #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            ProductType productType = productTypeRepo.GetById(ToSQL.SQLToInt(Request.QueryString["ID"]));

            if (productType != null)
            {
                lbMessage.Text   = "";
                productType.Name = txtName.Text;
                productType.DescriptionTemplate = CKEditorControlDescriptionType.Text;
                productType.Note     = txtNote.Text;
                productType.IsActive = ToSQL.SQLToBool(chkActive.Checked);
                int i = productTypeRepo.UpdateProductType(productType);
                Response.Redirect("~/Admincp/Management-ProductType.aspx");
            }
            else
            {
                Response.Redirect("~/Admincp/Management-ProductType.aspx");
            }
        }