예제 #1
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        int nowExpectNum = BLL.CommonClass.CommonDataBLL.getMaxqishu();

        if (nowExpectNum != 1)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("007094", "只有在第一期时才能初始化!") + "');</script>");
            return;
        }

        txtStoreId.Text = DisposeString.DisString(txtStoreId.Text.Trim());
        if (StoreRegisterConfirmBLL.CheckStoreId(DisposeString.DisString(this.txtStoreId.Text.Trim())))
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert("该店铺编号已存在!"));
            return;
        }

        Model.DefaultMessage def = GetModel(2, txtStoreId.Text.Trim());

        bool isSure = ManagerBLL.UpdateDefaultStore(def);

        if (!isSure)
        {
            Page.ClientScript.RegisterStartupScript(GetType(), "", Transforms.ReturnAlert("修改失败!"));
            return;
        }

        Page.ClientScript.RegisterStartupScript(GetType(), "", "<script language='javascript'>alert('修改成功!');</script>");
    }