protected void Page_Load(object sender, EventArgs e) { if ((this.Session["pwalletID"] != null) && (this.Session["pwalletID"].ToString() != "")) { this.adminID = this.Session["pwalletID"].ToString(); } else { base.Response.Redirect("../login.aspx"); } if (!base.IsPostBack) { this.Session["XPayMemberType"] = null; this.Session["grand_tot_cnt"] = null; this.Session["new_grand_tot_amt"] = null; this.Session["transID"] = null; this.Session["payment_type"] = null; this.Session["bank_xname"] = null; this.Session["bank_bankname"] = null; this.Session["bank_xposition"] = null; this.Session["bank_street"] = null; this.Session["bank_telephone"] = null; this.Session["bank_email"] = null; this.Session["transDate"] = null; this.c_pr = this.ret.getPratioByMemberID(this.adminID); if (this.c_pr.xid != null) { this.Session["XPayMemberType"] = this.c_pr.p_type; this.Session["merchant_type"] = this.c_pr.xsync; } else { this.Session["XPayMemberType"] = "admin"; this.Session["merchant_type"] = ""; } } if (this.Session["transID"] == null) { this.Session["transID"] = "0"; } if (this.Session["tm_cnt"] != null) { this.tm_cnt = Convert.ToInt32(this.Session["tm_cnt"]); } else { this.Session["tm_cnt"] = "0"; } if (this.Session["payment_type"] == null) { this.Session["payment_type"] = ""; } if (this.Session["bank_xname"] == null) { this.Session["bank_xname"] = ""; } if (this.Session["bank_bankname"] == null) { this.Session["bank_bankname"] = ""; } if (this.Session["bank_xposition"] == null) { this.Session["bank_xposition"] = ""; } if (this.Session["bank_street"] == null) { this.Session["bank_street"] = ""; } if (this.Session["bank_telephone"] == null) { this.Session["bank_telephone"] = ""; } if (this.Session["bank_email"] == null) { this.Session["bank_email"] = ""; } if (this.Session["transDate"] == null) { this.Session["bank_email"] = ""; } }
public List<XObjs.PRatio> getPratioByMerchant(string merchant) { List<XObjs.PRatio> list = new List<XObjs.PRatio>(); SqlConnection connection = new SqlConnection(hf.ConnectXpay()); SqlCommand command = new SqlCommand("SELECT * from p_ratio where xsync='" + merchant + "' ", connection); connection.Open(); SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection); while (reader.Read()) { XObjs.PRatio item = new XObjs.PRatio { xid = reader["xid"].ToString(), xpartnerID = reader["xpartnerID"].ToString(), p_type = reader["p_type"].ToString(), xratio = reader["xratio"].ToString(), r_type = reader["r_type"].ToString(), xreg_date = reader["xreg_date"].ToString(), xsync = reader["xsync"].ToString(), xvisible = reader["xvisible"].ToString() }; list.Add(item); } reader.Close(); return list; }
protected void Page_Load(object sender, EventArgs e) { if ((this.Session["pwalletID"] != null) && (this.Session["pwalletID"].ToString() != "")) { this.adminID = this.Session["pwalletID"].ToString(); } else { base.Response.Redirect("../login.aspx"); } if (!base.IsPostBack) { this.old_date = this.ret.getOldestDate(); this.Session["old_date"] = this.old_date; this.new_date = this.ret.getLatestDate(); this.Session["new_date"] = this.new_date; this.popYear(); this.Session["XPayMemberType"] = null; this.Session["grand_tot_cnt"] = null; this.Session["new_grand_tot_amt"] = null; } this.c_pr = this.ret.getPratioByMemberID(this.adminID); if (this.c_pr.xid != null) { this.Session["XPayMemberType"] = this.c_pr.p_type; } else { this.Session["XPayMemberType"] = "admin"; } if (this.Session["grand_tot_cnt"] == null) { this.Session["grand_tot_cnt"] = "0"; } if (this.Session["new_grand_tot_amt"] == null) { this.Session["new_grand_tot_amt"] = "0"; } }
public XObjs.PRatio getPratioByMemberID(string xmemberID) { XObjs.PRatio ratio = new XObjs.PRatio(); SqlConnection connection = new SqlConnection(hf.ConnectXpay()); SqlCommand command = new SqlCommand("SELECT * from p_ratio where xpartnerID='" + xmemberID + "' ", connection); connection.Open();command.CommandTimeout = 0; SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection); while (reader.Read()) { ratio.xid = reader["xid"].ToString(); ratio.xpartnerID = reader["xpartnerID"].ToString(); ratio.p_type = reader["p_type"].ToString(); ratio.xratio = reader["xratio"].ToString(); ratio.r_type = reader["r_type"].ToString(); ratio.xreg_date = reader["xreg_date"].ToString(); ratio.xsync = reader["xsync"].ToString(); ratio.xvisible = reader["xvisible"].ToString(); } reader.Close(); return ratio; }