首次推送
This commit is contained in:
257
Mtxfw.VipSite/Admin_Member_company_list.aspx.cs
Normal file
257
Mtxfw.VipSite/Admin_Member_company_list.aspx.cs
Normal file
@@ -0,0 +1,257 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
namespace Mtxfw.WebSite._Admin
|
||||
{
|
||||
public partial class Admin_Member_company_list : Mtxfw.Utility.MemberBase
|
||||
{
|
||||
public Mtxfw.DAL.business_info daoBus = new Mtxfw.DAL.business_info();
|
||||
DAL.user_Goods_lb daolb = new DAL.user_Goods_lb();
|
||||
DAL.P_Product daoProduct = new DAL.P_Product();
|
||||
DAL.user_info daoUser = new DAL.user_info();
|
||||
public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config("");
|
||||
public int gtype = 0;
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
if (Session["IFPassword"] == null)
|
||||
{
|
||||
Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_company_list.aspx");
|
||||
}
|
||||
if (IFStores != 1)
|
||||
{
|
||||
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
||||
}
|
||||
if (MemberJS.IndexOf("企业信息列表") == -1)
|
||||
{
|
||||
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
||||
}
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Select_Bind();
|
||||
Data_Bind();
|
||||
}
|
||||
|
||||
MyPager.PageChanged += delegate(object s, EventArgs ex)
|
||||
{
|
||||
Data_Bind();
|
||||
};
|
||||
}
|
||||
|
||||
protected void Data_Bind()
|
||||
{
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
String cls = Request.QueryString["cls"];
|
||||
String key = HttpUtility.UrlDecode(Request.QueryString["key"]);
|
||||
String state = HttpUtility.UrlDecode(Request.QueryString["state"]);
|
||||
|
||||
if (!String.IsNullOrEmpty(cls) && cls != "-1")
|
||||
{
|
||||
sb.Append("and ClsID=" + cls);
|
||||
Drop_Cls.SelectedValue = cls;
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(state) && state != "所有状态")
|
||||
{
|
||||
if (state == "已审核")
|
||||
{
|
||||
sb.Append("and seef=1");
|
||||
}
|
||||
if (state == "未审核")
|
||||
{
|
||||
sb.Append("and seef=0");
|
||||
}
|
||||
Drop_State.Text = state;
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(key))
|
||||
{
|
||||
sb.Append("and CompanyName like '%" + key + "%'");
|
||||
}
|
||||
string strOrder = " Order by ApplyTime desc";
|
||||
MyPager.PageSize = 50;
|
||||
MyPager.RecordCount = daoBus.GetCount("utype='1'" + sb.ToString());
|
||||
if (MyPager.RecordCount == 0)
|
||||
{
|
||||
MyPager.Visible = false;
|
||||
}
|
||||
Mtxfw.Utility.Tools.ToBind(Repeater1, daoBus.GetPager(MyPager, "(Select UserName From user_info b Where b.Id=a.UserId) as UserName,(Select realname From user_info b Where b.Id=a.UserId) as realname,", "utype='1'" + sb.ToString() + strOrder));
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void Select_Bind()
|
||||
{
|
||||
DataSet ds = daolb.GetList("gtype=" + gtype + " and utype=2 Order By LBLinkID");
|
||||
foreach (System.Data.DataRow Dr in ds.Tables[0].Rows)
|
||||
{
|
||||
Drop_Cls.Items.Add(new ListItem(Dr["LBName"].ToString(), Dr["id"].ToString()));
|
||||
}
|
||||
ds.Clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void Run_Click(object s, System.EventArgs e)
|
||||
{
|
||||
CheckBox Check = new CheckBox();
|
||||
string strs = seclect_Drop.SelectedItem.Value;
|
||||
foreach (RepeaterItem Item in Repeater1.Items)
|
||||
{
|
||||
//在行中查找到该单选框
|
||||
Check = (CheckBox)Item.FindControl("checka");
|
||||
int strID = int.Parse(Check.CssClass);
|
||||
if (Check.Checked == true)
|
||||
{
|
||||
Mtxfw.Model.business_info model = daoBus.GetModel(strID);
|
||||
if (model != null)
|
||||
{
|
||||
if (strs == "0")
|
||||
{
|
||||
daoBus.UpdateSel("seef", 1, strID);
|
||||
//daoUser.UpdateuLevel("uLevel18", 2, model.UserId);
|
||||
/*DataSet ds = daoProduct.GetList("", "gtype=" + gtype + " and utype='7' and IFDelete=0 and P_State='已处理'");
|
||||
if (ds.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
foreach (System.Data.DataRow Dr in ds.Tables[0].Rows)
|
||||
{
|
||||
Mtxfw.Model.P_Product pmodel = new Mtxfw.Model.P_Product();
|
||||
pmodel.P_NAME = Dr["P_NAME"].ToString();
|
||||
pmodel.P_ENAME = "";
|
||||
pmodel.P_NAME2 = "";
|
||||
pmodel.P_UserID = 0;
|
||||
pmodel.P_State = Dr["P_State"].ToString();
|
||||
pmodel.P_CATEGORY = Convert.ToInt32(Dr["P_CATEGORY"].ToString());
|
||||
pmodel.P_CATEGORYs = Dr["P_CATEGORYs"].ToString();
|
||||
|
||||
pmodel.P_Market_P = Convert.ToDouble(Dr["P_Market_P"].ToString());
|
||||
|
||||
pmodel.P_VIP_P = Convert.ToDouble(Dr["P_VIP_P"].ToString());
|
||||
|
||||
pmodel.P_VIP_P1 = Convert.ToDouble(Dr["P_VIP_P1"].ToString());
|
||||
|
||||
pmodel.P_VIP_P2 = Convert.ToDouble(Dr["P_VIP_P2"].ToString());
|
||||
|
||||
pmodel.P_M_P = int.Parse(Dr["P_M_P"].ToString());
|
||||
|
||||
pmodel.P_CB_P = Convert.ToDouble(Dr["P_CB_P"].ToString());
|
||||
|
||||
pmodel.P_YH_P = Convert.ToDouble(Dr["P_YH_P"].ToString());
|
||||
|
||||
pmodel.P_M_Web = Dr["P_State"].ToString();
|
||||
pmodel.P_DESCRIPTION = Dr["P_State"].ToString();
|
||||
pmodel.P_COMMENDF = false;
|
||||
pmodel.P_Orders = 0;
|
||||
pmodel.P_ADDATE = DateTime.Now;
|
||||
pmodel.P_HITED = 0;
|
||||
pmodel.utype = "7";
|
||||
pmodel.Province = "0";
|
||||
pmodel.City = "0";
|
||||
pmodel.County = "0";
|
||||
pmodel.P_JiangLi = int.Parse(Dr["P_State"].ToString());
|
||||
pmodel.P_JiangLi2 = int.Parse(Dr["P_State"].ToString());
|
||||
pmodel.P_JiangLi3 = 0;
|
||||
pmodel.P_yanse = "";
|
||||
pmodel.P_images = "";
|
||||
pmodel.P_DESCRIPTION1 = Dr["P_State"].ToString();
|
||||
pmodel.P_DESCRIPTION2 = Dr["P_State"].ToString();
|
||||
pmodel.P_EDESCRIPTION = Dr["P_State"].ToString();
|
||||
pmodel.P_bianhao = Dr["P_State"].ToString();
|
||||
pmodel.gtype = gtype;
|
||||
int returnid = daoProduct.Add(pmodel);
|
||||
DataSet ds0 = new DAL.P_Guige().GetList("", "ttype=0 And G_PID=" + Dr["P_ID"].ToString());
|
||||
if (ds0.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
foreach (System.Data.DataRow Dr0 in ds0.Tables[0].Rows)
|
||||
{
|
||||
Mtxfw.Model.P_Guige gmodel = new Model.P_Guige();
|
||||
gmodel.G_PID = returnid;
|
||||
gmodel.G_Name = Dr0["G_Name"].ToString();
|
||||
gmodel.G_JG = Convert.ToDouble(Dr0["G_JG"].ToString());
|
||||
gmodel.G_JG0 = Convert.ToDouble(Dr0["G_JG0"].ToString());
|
||||
gmodel.G_JG1 = Convert.ToDouble(Dr0["G_JG1"].ToString());
|
||||
gmodel.G_JG2 = Convert.ToDouble(Dr0["G_JG2"].ToString());
|
||||
gmodel.G_JG3 = Convert.ToDouble(Dr0["G_JG3"].ToString());
|
||||
gmodel.G_JG4 = Convert.ToDouble(Dr0["G_JG4"].ToString());
|
||||
gmodel.G_JF = Convert.ToDouble(Dr0["G_JF"].ToString());
|
||||
gmodel.G_ZL = Convert.ToDouble(Dr0["G_ZL"].ToString());
|
||||
gmodel.G_Color = Dr0["G_Color"].ToString();
|
||||
gmodel.G_KC = Convert.ToInt32(Dr0["G_KC"].ToString());
|
||||
gmodel.G_Images = Dr0["G_Images"].ToString();
|
||||
gmodel.ttype = 0;
|
||||
gmodel.MemberId = 0;
|
||||
new DAL.P_Guige().Add(gmodel);
|
||||
}
|
||||
}
|
||||
ds0.Clear();
|
||||
}
|
||||
}
|
||||
ds.Clear();*/
|
||||
}
|
||||
else if (strs == "1")
|
||||
{
|
||||
daoBus.UpdateSel("seef", 0, strID);
|
||||
//daoUser.UpdateuLevel("uLevel18", 0, model.UserId);
|
||||
daoProduct.UpdateIFDelete0(1, DateTime.Now.ToString(), model.UserId);
|
||||
}
|
||||
else if (strs == "14")
|
||||
{
|
||||
//daoUser.UpdateuLevel("uLevel18", 0, model.UserId);
|
||||
Model.User_CZ_log logmodel = new Model.User_CZ_log();
|
||||
logmodel.MemberId = Card;
|
||||
logmodel.AddTime = DateTime.Now;
|
||||
logmodel.IP = Mtxfw.Utility.Common.GetIP;
|
||||
logmodel.Body = "删除门店" + model.CompanyName;
|
||||
logmodel.UType = 0;
|
||||
logmodel.gtype = gtype;
|
||||
new DAL.User_CZ_log().Add(logmodel);
|
||||
daoBus.Delete(strID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
System.Collections.IDictionaryEnumerator CacheEnum = Cache.GetEnumerator();
|
||||
while (CacheEnum.MoveNext())
|
||||
{
|
||||
Cache.Remove(CacheEnum.Key.ToString());
|
||||
}
|
||||
Response.Redirect(Request.Url.AbsoluteUri);
|
||||
}
|
||||
public string cuploadimages(string uploadimages)
|
||||
{
|
||||
string str = "";
|
||||
string[] auploadimages = uploadimages.Split('|');
|
||||
for (int i = 0; i < auploadimages.Length; i++)
|
||||
{
|
||||
if (auploadimages[i] != "")
|
||||
{
|
||||
string src = auploadimages[i], src0 = auploadimages[i];
|
||||
if (auploadimages[i].IndexOf("https://vip.ksd2023.com") != -1)
|
||||
{
|
||||
src = "https://vip.ksd2023.com/GetFiles.ashx?image=" + auploadimages[i].Replace("https://vip.ksd2023.com", "").Replace("Files/Image/", "") + "&itsize=100x100&itmode=cut";
|
||||
src0 = "https://vip.ksd2023.com/GetFiles.ashx?image=" + auploadimages[i].Replace("https://vip.ksd2023.com", "").Replace("Files/Image/", "") + "&itsize=10000x10000&itmode=cut";
|
||||
}
|
||||
else if (auploadimages[i].IndexOf("https://www.pmhapp.cn") != -1)
|
||||
{
|
||||
src = "https://www.pmhapp.cn/GetFiles.ashx?image=" + auploadimages[i].Replace("https://www.pmhapp.cn", "").Replace("Files/Image/", "") + "&itsize=100x100&itmode=cut";
|
||||
src0 = "https://www.pmhapp.cn/GetFiles.ashx?image=" + auploadimages[i].Replace("https://www.pmhapp.cn", "").Replace("Files/Image/", "") + "&itsize=10000x10000&itmode=cut";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (auploadimages[i].IndexOf("https://") == -1 && auploadimages[i].IndexOf("http") == -1)
|
||||
{
|
||||
src = "/GetFiles.ashx?image=" + auploadimages[i].Replace("Files/Image/", "") + "&itsize=100x100&itmode=cut";
|
||||
src0 = "/GetFiles.ashx?image=" + auploadimages[i].Replace("Files/Image/", "") + "&itsize=10000x10000&itmode=cut";
|
||||
}
|
||||
}
|
||||
str += ("<a href=\"" + src0 + "\" target=\"_blank\"><img src=\"" + src + "\" /></a>");
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user