Exemplo n.º 1
0
    protected void InitPage()
    {
        DAL.McManaDAL.MerInfoMaintDAL func = new DAL.McManaDAL.MerInfoMaintDAL();
        int         mer_id = int.Parse(Request.QueryString["mer_id"]);
        McBasicInfo mc     = func.GetMerchantInfoByID(mer_id);

        MerBas_Name.Text      = mc.MerName;
        MerBas_Intro.Text     = mc.MerInfo;
        MerBas_Pic.ImageUrl   = mc.MerPic;
        MerBas_Address.Text   = mc.MerAddr;
        MerBas_Phone.Text     = mc.MerPhone;
        MerBas_Web.Text       = mc.MerWebsite;
        MerBas_Email.Text     = mc.RegEmail;
        MerBas_Relat.Text     = mc.RegName;
        MerBas_StarLevel.Text = mc.MerStarLever.ToString();
        string[] city_Pro = func.GetCityAndProvin(mc.CityID);
        MerBas_Province.Text = city_Pro[1];
        MerBas_City.Text     = city_Pro[0];



        int     count = 0;
        DataSet ds    = func.GetAllProductByMerID(mer_id, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, out count);

        AspNetPager1.RecordCount = count;
        PrdRpt.DataSource        = ds;
        PrdRpt.DataBind();
    }
 /// <summary>
 /// 初始化界面
 /// </summary>
 public void InitPage()
 {
     if (Request.QueryString["merID"] != null)
     {
         DAL.OveralManaDAL.MerchantManaDAL mc = new DAL.OveralManaDAL.MerchantManaDAL();
         int     merID = Convert.ToInt32(Request.QueryString["merID"]);
         DataSet merDs = mc.getMerDetailByID(merID);
         MerDetailRpt.DataSource = merDs;
         MerDetailRpt.DataBind();
         if (merDs.Tables[0].Rows.Count > 0)
         {
             string recState = merDs.Tables[0].Rows[0]["rec_mer_state"].ToString();
             RcmBtn.CommandArgument     = merDs.Tables[0].Rows[0]["mer_id"].ToString();
             SendMsgBtn.CommandArgument = merDs.Tables[0].Rows[0]["mer_id"].ToString();
             merPicPath = merDs.Tables[0].Rows[0]["mer_pic"].ToString();
             if (recState.Equals("是"))
             {
                 RcmBtn.CommandName = "CancelMerRcm";
                 RcmBtn.Text        = "取消商家推荐";
             }
             else
             {
                 RcmBtn.CommandName = "SetMerRcm";
                 RcmBtn.Text        = "推荐该商家";
             }
         }
         DAL.OveralManaDAL.PrdManaDAL pd = new DAL.OveralManaDAL.PrdManaDAL();
         PrdRpt.DataSource = pd.GetAllPrdList("", merID, -1);
         PrdRpt.DataBind();
     }
 }