71 lines
2.4 KiB
C#
71 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using SOH.Kernel;
|
|
using EAS.Services;
|
|
using SOH.BLL;
|
|
using SOH.Entities;
|
|
|
|
namespace SaleSettings
|
|
{
|
|
|
|
[ModuleAttribute(ModuleID = "0BD24179-E296-42C6-A0B4-44B164BB7E17", ModuleName = "客户资料管理中心")]
|
|
public partial class frmKeHuZiLiao : SOH.Window.baseChildForm
|
|
{
|
|
public frmKeHuZiLiao()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public void frmKeHuZiLiao_Load(object sender, EventArgs e)
|
|
{
|
|
var service = ServiceContainer.GetService<Its_kh>();
|
|
if (SOH.LoginUser.yydm == "1")
|
|
{
|
|
dgvkhlist.DataSource = Newtonsoft.Json.JsonConvert.DeserializeObject(service.Getkh("", SOH.LoginUser.username), typeof(DataTable));
|
|
}
|
|
else
|
|
{
|
|
dgvkhlist.DataSource = Newtonsoft.Json.JsonConvert.DeserializeObject(service.Getkh("", SOH.LoginUser.username), typeof(DataTable));
|
|
}
|
|
|
|
}
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
{
|
|
frmKeHuZiLiaoCz cz = new frmKeHuZiLiaoCz(this);
|
|
cz.ShowDialog();
|
|
}
|
|
|
|
private void textBox1_TextChanged(object sender, EventArgs e)
|
|
{
|
|
var service = ServiceContainer.GetService<Its_kh>();
|
|
if (SOH.LoginUser.yydm == "1")
|
|
{
|
|
dgvkhlist.DataSource = Newtonsoft.Json.JsonConvert.DeserializeObject(service.Getkh(this.tbp.Text, SOH.LoginUser.username), typeof(DataTable));
|
|
}
|
|
else
|
|
{
|
|
dgvkhlist.DataSource = Newtonsoft.Json.JsonConvert.DeserializeObject(service.Getkh(this.tbp.Text, ""), typeof(DataTable));
|
|
}
|
|
}
|
|
|
|
private void button2_Click(object sender, EventArgs e)
|
|
{
|
|
int a = Convert.ToInt32(dgvkhlist.Rows[dgvkhlist.CurrentRow.Index].Cells["客户编码"].Value);
|
|
frmKeHuZiLiaoCz cz = new frmKeHuZiLiaoCz(Convert.ToInt32(dgvkhlist.Rows[dgvkhlist.CurrentRow.Index].Cells["客户编码"].Value),1,this);
|
|
cz.ShowDialog();
|
|
}
|
|
|
|
private void dgvkhlist_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
|
{
|
|
button2_Click(null, null);
|
|
}
|
|
}
|
|
}
|