微信小店商品上传 50%
This commit is contained in:
1 parent
8f9bae9875
commit
343b01ab90
83 files changed
+12877
-656
No files matched your search
@@ -0,0 +1,149 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using TemuKJD.BaseForms;
|
||||
using AllBase;
|
||||
|
||||
namespace TemuKJD.WXForms.ProductForms
|
||||
{
|
||||
public partial class WXProductForm : BaseForm
|
||||
{
|
||||
public static WXProductForm instance;
|
||||
public Lazy<WXDBProdUploadForm> userSelectDbProductForm = new Lazy<WXDBProdUploadForm>();
|
||||
//public Lazy<PDDProductUpDownForm> productUpDownForm = new Lazy<PDDProductUpDownForm>();
|
||||
//public Lazy<PDDProdCouponForm> prodCouponForm = new Lazy<PDDProdCouponForm>();
|
||||
|
||||
public WXProductForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
try
|
||||
{
|
||||
tv.SelectedNode = tv.Nodes[0].Nodes[0];
|
||||
tv.ExpandGroup(tv.Nodes[0].Name);
|
||||
|
||||
if (BaseClass.GroupId == 3)
|
||||
{
|
||||
//hideName.Remove("设置进货价");
|
||||
if (BaseClass.SaLevel == 1)
|
||||
{
|
||||
}
|
||||
if (BaseClass.SaLevel == 2)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void tv_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
instance = this;
|
||||
|
||||
MainForm.sCurrentModule = e.Node.Name;
|
||||
this.lblName.Text = e.Node.Text;
|
||||
|
||||
//如果是一级菜单,不做任何动作
|
||||
if (e.Node.Parent == null) return;
|
||||
new Thread(() =>
|
||||
{
|
||||
Thread.Sleep(200);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
switch (e.Node.Name)
|
||||
{
|
||||
case "选品上传":
|
||||
SetForm(userSelectDbProductForm.Value);
|
||||
break;
|
||||
//case "商品列表":
|
||||
// SetForm(productUpDownForm.Value);
|
||||
// break;
|
||||
//case "营销工具":
|
||||
// SetForm(prodCouponForm.Value);
|
||||
// break;
|
||||
}
|
||||
}));
|
||||
}).Start();
|
||||
}
|
||||
|
||||
public void SetTvSelect(string name)
|
||||
{
|
||||
var n = tv.Nodes[0].Nodes.Find(name, true);
|
||||
if (n.Count() > 0)
|
||||
tv.SelectedNode = n[0];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示隐藏层
|
||||
/// </summary>
|
||||
/// <param name="f"></param>
|
||||
private void SetForm(Form f)
|
||||
{
|
||||
if (f == null)
|
||||
{
|
||||
foreach (Control form in panel3.Controls)
|
||||
{
|
||||
form.Visible = false;
|
||||
if (form is Form)
|
||||
{
|
||||
panel3.Controls.Remove(form);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
bool had = false;
|
||||
string sCurrentFormName = f.Name;
|
||||
for (int i = 0; i < panel3.Controls.Count; i++)
|
||||
{
|
||||
if (sCurrentFormName == panel3.Controls[i].Name)
|
||||
{
|
||||
had = true;
|
||||
panel3.Controls[i].Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
panel3.Controls[i].Visible = false;
|
||||
}
|
||||
}
|
||||
if (had)
|
||||
{
|
||||
return;
|
||||
}
|
||||
f.TopLevel = false;
|
||||
f.Left = 0;
|
||||
f.Top = 0;
|
||||
f.FormBorderStyle = FormBorderStyle.None;
|
||||
panel3.Controls.Add(f);
|
||||
f.AutoSize = true;
|
||||
f.Dock = DockStyle.Fill;
|
||||
f.Show();
|
||||
}
|
||||
|
||||
private void ShopForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
tv.SelectedNode = tv.Nodes[0].Nodes[0];
|
||||
tv.ExpandGroup(tv.Nodes[0].Name);
|
||||
|
||||
List<string> hideName = new List<string>() { /*"营销工具"*/ };
|
||||
|
||||
foreach (var item in hideName)
|
||||
{
|
||||
var n = tv.Nodes[0].Nodes.Find(item, true);
|
||||
if (n.Count() > 0)
|
||||
n[0].Remove();
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user