using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data;
namespace Mtxfw.VipSite
{
public partial class Admin_Member_YBJY_Cx : Mtxfw.Utility.MemberBase
{
public Mtxfw.DAL.user_bank daoBank = new Mtxfw.DAL.user_bank();
public Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
public Mtxfw.DAL.user_Results daoResults = new Mtxfw.DAL.user_Results();
public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config("");
public string strTitle = "交流详情", JYLX = "", JYED = "", JYJG = "", ZPJF = "", SJ = "", SJ0 = "", SJ1 = "", SJ2 = "", SJ3 = "", strSeef = "", strcz = "", UserName = "", UserName2 = "", dkxx = "", skxx="", strID = "0";
protected string strUrl = "";
public int ifqx = 0, Seef=0;
public int gtype = 0;
#region 判断页面是否刷新
private bool _refreshState;
private bool _isRefresh;
///
/// 判断页面是否刷新
///
public bool IsRefresh
{
get
{
return _isRefresh;
}
}
protected override void LoadViewState(object savedState)
{
object[] allStates = (object[])savedState;
base.LoadViewState(allStates[0]);
_refreshState = (bool)allStates[1];
_isRefresh = _refreshState == (bool)Session["__ISREFRESH"];
}
protected override object SaveViewState()
{
Session["__ISREFRESH"] = _refreshState;
object[] allStates = new object[2];
allStates[0] = base.SaveViewState();
allStates[1] = !_refreshState;
return allStates;
}
#endregion
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
string hostname = Request.Url.Host;
/*if (!String.IsNullOrEmpty(Request.QueryString["t"]))
{
t = Convert.ToInt32(Request.QueryString["t"].ToString());
}*/
if (IFStores == 1)
{
if (!String.IsNullOrEmpty(Request.QueryString["MID"]))
{
Card = Convert.ToInt32(Request.QueryString["MID"]);
IFStores = 0;
strUrl = "MID=" + Card;
}
}
else
{
if (Session["IFPassword"] == null)
{
Response.Redirect("/Member_IFPassword.aspx?Url=/Member_YBJY_Cx.aspx&" + strUrl);
}
}
if (!String.IsNullOrEmpty(Request.QueryString["ID"]))
{
strID = Request.QueryString["ID"].ToString();
Int64 ViewID = Int64.Parse(strID);
Mtxfw.Model.user_Results rmodel = daoResults.GetModel(ViewID);
if (rmodel != null)
{
if (rmodel.IFDelete == 1)
{
ClientScript.RegisterStartupScript(this.GetType(), "", "");
}
if (rmodel.Seef == 0 && rmodel.MemberId == Card)
{
ifqx = 1;
}
Mtxfw.Model.user_info umodel = daoUser.GetModel(rmodel.MemberId);
if (umodel != null)
{
JYJG = rmodel.b0.ToString();
ZPJF = rmodel.b6.ToString();
SJ = rmodel.addtime.ToString("yyyy-MM-dd HH:mm:ss");
strSeef = Mtxfw.Utility.Common.GetProZT(rmodel.Seef, Convert.ToInt32(rmodel.b2.ToString().Split('.')[0]), Convert.ToInt32(rmodel.b3.ToString().Split('.')[0]), Convert.ToInt32(rmodel.b7.ToString().Split('.')[0]), Convert.ToInt32(rmodel.b8.ToString().Split('.')[0]), Convert.ToInt32(rmodel.b14.ToString().Split('.')[0]), Convert.ToInt32(rmodel.b16.ToString().Split('.')[0]));
Seef=rmodel.Seef;
if (rmodel.Seef > 0)
{
SJ = rmodel.yytime.ToString("yyyy-MM-dd HH:mm:ss");
SJ0 = rmodel.addtime.ToString("yyyy-MM-dd HH:mm:ss");
SJ1 = rmodel.jdtime.ToString("yyyy-MM-dd HH:mm:ss");
if (rmodel.Seef == 1)
{
if (rmodel.jdtime.AddMinutes(Convert.ToInt32(config.webMoney40)) < DateTime.Now)
{
strSeef = "超时未支付";
}
}
if (rmodel.Seef == 2)
{
if (rmodel.paytime.AddMinutes(Convert.ToInt32(config.webMoney40)) < DateTime.Now)
{
strSeef = "超时未确认收款";
}
}
if (rmodel.Seef > 1)
{
SJ2 = rmodel.paytime.ToString("yyyy-MM-dd HH:mm:ss");
}
if (rmodel.Seef > 2)
{
SJ3 = rmodel.seeftime.ToString("yyyy-MM-dd HH:mm:ss");
}
dkxx = "
| 收款方信息: | ";
dkxx += " 姓名:" + umodel.RealName;
dkxx += " 手机号:" + umodel.Phone;
Mtxfw.Model.user_info tjumodel = daoUser.GetModel(umodel.ContactID);
if (tjumodel != null)
{
dkxx += " 推荐人姓名:" + tjumodel.RealName;
dkxx += " 推荐人手机号:" + tjumodel.Phone;
}
if (umodel.Phone2 != "")
{
dkxx += " 开户姓名:" + umodel.ProductName;
dkxx += " 银行名称:" + umodel.RealName2;
dkxx += " 银行卡号:" + umodel.Phone2;
dkxx += " 开户行地址:" + umodel.PostalCode;
}
if (umodel.Phone2 != "")
{
dkxx += " 支付宝账号:" + umodel.AliAccount;
dkxx += " 支付宝姓名:" + umodel.AliName;
}
dkxx += " ";
if (umodel.aliimage != "")
{
dkxx += "支付宝收款码 ";
}
if (umodel.weixinimage != "")
{
dkxx += "微信收款码 ";
}
dkxx += " |
";
UserName = "| 卖方: | " + umodel.UserName + " |
";
dkxx += "| 付款方信息: | ";
Mtxfw.Model.user_info umodel2 = daoUser.GetModel(rmodel.UserId);
if (umodel2 != null)
{
dkxx += " 姓名:" + umodel2.RealName;
dkxx += " 手机号:" + umodel2.Phone;
Mtxfw.Model.user_info tjumodel2 = daoUser.GetModel(umodel2.ContactID);
if (tjumodel2 != null)
{
dkxx += " 推荐人姓名:" + tjumodel2.RealName;
dkxx += " 推荐人手机号:" + tjumodel2.Phone;
}
dkxx += " ";
string[] aimages = rmodel.Managers.Split('|');
if (aimages[0]!="")
{
dkxx += "
";
}
if (aimages.Length>1)
{
if (aimages[1] != "")
{
dkxx += "
";
}
}
if (aimages.Length > 2)
{
if (aimages[2] != "")
{
dkxx += "
";
}
}
if (rmodel.conent != "")
{
dkxx += " " + Mtxfw.Utility.Common.InputText(rmodel.conent);
}
UserName2 = " |
| 买方: | " + umodel2.UserName + " |
";
}
dkxx += "";
if (rmodel.Seef == 1)
{
strcz = "确认支付";
if (rmodel.b16 == 1)
{
if(rmodel.jdtime.AddMinutes(Convert.ToInt32(config.webMoney40)) < DateTime.Now)
{
strcz += "扣除买家"+ config.webMoney46 + "%转卖积分给卖家";
}
}
}
else if (rmodel.Seef == 2)
{
strcz = "确认收到";
}
}
}
}
}
if (!IsPostBack)
{
Page.Title = strTitle + " - " + GetWebName;
}
}
}
}