예제 #1
0
    protected void Save_Btn_Click(object sender, EventArgs e)
    {
        M_UserInfo   mu       = buser.GetLogin();
        M_CommonData storeMod = ExHelper.Store2_User();
        M_WX_APPID   appMod   = new M_WX_APPID();

        if (DataConvert.CLng(storeMod.SpecialID) > 0)
        {
            appMod = appBll.SelReturnModel(DataConvert.CLng(storeMod.SpecialID));
        }
        appMod.Alias = storeMod.Title;
        appMod.APPID = AppID_T.Text.Trim();
        if (QCode_UP.HasFile)
        {
            QCode_UP.SaveFile();
            appMod.QRCode = QCode_UP.FileUrl.Replace("/UploadFiles/", "");;
        }
        appMod.WxNo          = WXNo_T.Text.Trim();
        appMod.Secret        = Secret_T.Text.Trim();
        appMod.OrginID       = OrginID.Text.Trim();
        appMod.Pay_AccountID = Pay_Account.Text.Trim();
        appMod.Pay_Key       = Pay_Key.Text.Trim();
        if (appMod.ID > 0)
        {
            appBll.UpdateByID(appMod);
        }
        else
        {
            appMod.ID          = appBll.Insert(appMod);
            storeMod.SpecialID = appMod.ID.ToString();
            DBCenter.UpdateSQL("ZL_Store_Reg", "StoreStyleID=" + appMod.ID, "ID=" + storeMod.ItemID);
        }
        function.WriteSuccessMsg("操作成功");
    }
예제 #2
0
    protected void Save_Btn_Click(object sender, EventArgs e)
    {
        M_UserInfo   mu       = buser.GetLogin();
        M_Store_Info storeMod = storeBll.SelReturnModel(mu.SiteID);
        M_WX_APPID   appMod   = appBll.SelModelByStoreId(storeMod.ID);

        if (appMod == null)
        {
            appMod = new M_WX_APPID();
        }
        appMod.IsDefault = storeMod.ID;
        appMod.Alias     = storeMod.Title;
        appMod.APPID     = AppID_T.Text.Trim();
        if (QCode_UP.HasFile)
        {
            QCode_UP.SaveFile();
            appMod.QRCode = QCode_UP.FileUrl.Replace("/UploadFiles/", "");;
        }
        appMod.WxNo          = WXNo_T.Text.Trim();
        appMod.Secret        = Secret_T.Text.Trim();
        appMod.OrginID       = OrginID.Text.Trim();
        appMod.Pay_AccountID = Pay_Account.Text.Trim();
        if (appMod.ID > 0)
        {
            appBll.UpdateByID(appMod);
        }
        else
        {
            appMod.ID = appBll.Insert(appMod);
            M_ModelInfo  modInfo = new B_Model().SelReturnModel(50);
            B_Content    conBll  = new B_Content();
            M_CommonData conMod  = new M_CommonData();
            conMod.NodeID    = 5;
            conMod.ModelID   = modInfo.ModelID;
            conMod.Title     = appMod.Alias;
            conMod.Inputer   = mu.UserName;
            conMod.ItemID    = appMod.ID;
            conMod.TableName = modInfo.TableName;
            conBll.insert(conMod);
        }
        function.WriteSuccessMsg("操作成功");
    }