Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //注册客户端(前端)函数的引用
            String cbReference    = Page.ClientScript.GetCallbackEventReference(this, "arg", "ReceiveData", "context");
            String callbackScript = "function CallServer(arg, context) {\n" + cbReference + ";\n}";

            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "CallServer", callbackScript, true);



            //获取卖家id
            sellerId = SellersBLL.GetSellerIdByNick(Users.Nick);

            //获取没手机号的会员
            tbSource = BuyerBLL.GetSellerNoDetailsInfo(sellerId);
            if (tbSource != null && tbSource.Rows.Count >= 0)
            {
                LabelNoNum.Text = tbSource.Rows.Count.ToString();
            }

            //获取上次卖家手工同步数据的时间
            string synDate = SellersBLL.GetSellerSynDate(Users.Nick);

            if (!string.IsNullOrEmpty(synDate))
            {
                lbsynDate.Text = "上次同步成功完成(上次同步时间:" + synDate + ")";
            }
            else
            {
                lbsynDate.Text = "您还没有同步过数据!";
            }

            if (!Page.IsPostBack)
            {
            }
            else
            {
                if (Request.Form["__EVENTARGUMENT"] == "updatetime")
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "success", "msgbox('会员资料同步完成!');", true);
                }
            }
        }
Esempio n. 2
0
 protected void grdCus_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     try
     {
         if (e.Row.RowType == DataControlRowType.DataRow)
         {
             string canUseMsg = e.Row.Cells[3].Text.Trim();
             if (canUseMsg.Equals("0") || canUseMsg.Equals("-1"))
             {
                 e.Row.Cells[3].ForeColor = Color.Red;
             }
             string nick = e.Row.Cells[0].Text.Trim();
             if (!string.IsNullOrEmpty(nick))
             {
                 string sydate = SellersBLL.GetSellerSynDate(nick);
                 if (string.IsNullOrEmpty(sydate) == false)
                 {
                     e.Row.Cells[6].Text = sydate;
                 }
                 else
                 {
                     e.Row.Cells[6].Text = "还未同步";
                 }
             }
             string msgStatus = e.Row.Cells[5].Text.Trim();
             if (msgStatus.Equals("False"))
             {
                 e.Row.Cells[5].ForeColor = Color.Red;
                 e.Row.Cells[5].Text      = "不可用";
             }
         }
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Web_UI);
     }
 }