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 CoreFS.CA06;using Pur.Entity;
using Pur.Entity.configureEntity;
using Core.Mes.Client.Comm.Control;
using com.hnshituo.pur.vo;
using Core.Mes.Client.Comm.Tool;
using Pur.PublicTools;
using Core.Mes.Client.Comm.Server;
using System.Collections;
namespace Pur.configure
{
public partial class FrmActualSeat : FrmPmsBase
{
public FrmActualSeat()
{
InitializeComponent();
}
private void FrmActualSeat_Load(object sender, EventArgs e)
{
GridHelper.SetExcludeColumnsActive(ultraGrid1.DisplayLayout.Bands[0],new string[]{});
GridHelper.SetExcludeColumnsActive(ultraGrid2.DisplayLayout.Bands[0], new string[] { });
GridHelper.SetExcludeColumnsActive(ultraGrid2.DisplayLayout.Bands[0], new string[] { });
DataTable dt1 = ServerHelper.GetData("com.hnshituo.pur.configure.service.impl.CoreBaseInfoNew.doQuery", new Object[] { "1230" }, this.ob);
if (dt1.Rows.Count > 0)
{
dt1.DefaultView.Sort = "BASENAME";
dt1 = dt1.DefaultView.ToTable();
}
publicPms.FilComboboxAdd(txt_costCenter, dt1, "baseCode", "baseName", "validflag NOT in ('0')", true, "/", "");
txt_costCenter.SelectedIndex = -1;
GetQureyPhysicWH();
}
#region toolbar工具区
public override void ToolBar_Click(object sender, string ToolBarKey)//toolbar
{
switch (ToolBarKey)
{
case "Query"://查询物理库区数据
GetQureyPhysicWH();
//GetQueryPhysicWH();
break;
case "Add"://增加
if (ultraTabControl1.SelectedTab == ultraTabControl1.Tabs[0])
{
AddPhysicWH();
}
else if (ultraTabControl1.SelectedTab == ultraTabControl1.Tabs[1])
{
AddPos();
}
else if (ultraTabControl1.SelectedTab == ultraTabControl1.Tabs[2])
{
AddMan();
}
else
{
MessageUtil.ShowTips("请选择编辑区对应的库区、库位、负责人窗口进行操作");
}
break;
case "Update"://修改
if (ultraTabControl1.SelectedTab == ultraTabControl1.Tabs[0])
{
EditPhysicWH();
}
else
{
MessageUtil.ShowTips("库位、负责人窗口无法修改,或请重新添加");
}
break;
case "Delete"://删除
if (ultraTabControl1.SelectedTab == ultraTabControl1.Tabs[0])
{
DeletePhysicWH();
}
else if (ultraTabControl1.SelectedTab == ultraTabControl1.Tabs[1])
{
DeletePosWH();
}
else if (ultraTabControl1.SelectedTab == ultraTabControl1.Tabs[2])
{
DeleteManWH();
}
else
{
MessageUtil.ShowTips("请选择编辑区对应的库区、库位、负责人窗口进行操作");
}
break;
case "exit"://关闭窗口
this.Close();
break;
case "doexcl":
this.doExcel();
break;
}
}
private void doExcel()
{
try
{
this.Cursor = Cursors.Default;
ArrayList alUltraGrid = new ArrayList();
alUltraGrid.Add(ultraGrid1);
ArrayList alSheeft = new ArrayList();
alSheeft.Add("物理库区信息");
if (ultraGrid1.Rows.Count > 0)
{
GridHelper.ulGridToExcel(alUltraGrid, alSheeft, "物理库区信息表");//导出excel
}
else
{
MessageUtil.ShowTips("无可导出明细!");
}
}
catch (Exception e)
{
MessageUtil.ShowTips("导出失败" + e.Message);
}
finally
{
this.Cursor = Cursors.Default;
}
}
///
/// 查询物理库区信息
///
private void GetQureyPhysicWH()// 查询物理库区信息
{
try
{
this.Cursor = Cursors.WaitCursor;
cleanArea();
dataSet1.Clear();
dataSet2.Clear();
dataSet3.Clear();
PhysicSeatEntity Phouse = new PhysicSeatEntity();
Phouse.Validflag = "1";
Phouse.InvPhysic = tbxPhysicQ.Text.ToString().Trim();
Phouse.InvPhysicName = tbxPhysicNameQ.Text.ToString().Trim();
Phouse.OrgName = tbx_orgNameQ.Text.Trim();
DataTable dt = this.execute("com.hnshituo.pur.configure.service.ActualSeatService", "getActualSeat", new object[] { Phouse, 0, 0 });
if (dt != null)
{
GridHelper.CopyDataToDatatable(ref dt, ref dataTable1, true);
GridHelper.RefreshAndAutoSize(ultraGrid1);
}
}
catch (Exception ex)
{
MessageBox.Show("查询失败:" + ex.Message);
}
finally
{
this.Cursor = Cursors.Default;
}
}
///
/// 删除物理库存区信息
///
private void DeletePhysicWH()// 删除物理库存区信息
{
try
{
if (ultraGrid1.ActiveRow != null)
{
String StrPhysic = ultraGrid1.ActiveRow.Cells["invPhysic"].Value.ToString().Trim();
if (MessageBox.Show("删除编号为[" + StrPhysic + "]的物理库区?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
{
PhysicSeatEntity Phouse = new PhysicSeatEntity();
Phouse.InvPhysic = StrPhysic;
Phouse.Validflag = "0";
Phouse.DeleteName = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
Phouse.DeleteUserid = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();
Phouse.DeleteTime = DateTime.Now;
CoreResult result = this.execute("com.hnshituo.pur.configure.service.ActualSeatService", "doUpdate", new object[] { Phouse, 0, 0 });
if (result.Resultcode == 0)
{
MessageBox.Show("删除成功", "提示");
GetQureyPhysicWH();
ConfigureClassCommon.doActiveSelRow(ultraGrid1, "invPhysic", StrPhysic);
}
else
{
MessageBox.Show("删除失败:" + result.Resultmsg);
}
}
}
else
{
MessageBox.Show("请选择一条需要删除的库区信息行", "提示");
}
}
catch (Exception ex)
{
MessageBox.Show("删除失败:" + ex.Message,"提示");
}
}
///
/// 删除物理库存区信息
///
private void DeletePosWH()// 删除物理库存区信息
{
try
{
if (ultraGrid2.ActiveRow != null)
{
String StrPhysic = ultraGrid2.ActiveRow.Cells["invPhysic"].Value.ToString().Trim();
String StrPos = ultraGrid2.ActiveRow.Cells["invPos"].Value.ToString().Trim();
String StrPosName = ultraGrid2.ActiveRow.Cells["invPosName"].Value.ToString().Trim();
String StrId = ultraGrid2.ActiveRow.Cells["id"].Value.ToString().Trim();
if (String.IsNullOrEmpty(StrId))
{
MessageUtil.ShowTips("未获取该行主键,请刷新界面重试");
return;
}
if (String.IsNullOrEmpty(StrPhysic))
{
MessageUtil.ShowTips("未获取到库区编码,请刷新界面重试");
return;
}
if (MessageBox.Show("移除库区[" + StrPhysic + "]的库位[" + StrPosName + "]?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
{
ActualSeatPosEntity PosEntity = new ActualSeatPosEntity();
PosEntity.Id = StrId;
PosEntity.InvPos = StrPos;
PosEntity.Validflag = "0";
PosEntity.DeleteUserid = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();
PosEntity.DeleteName = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
PosEntity.DeleteTime = DateTime.Now;
CoreResult result = this.execute("com.hnshituo.pur.configure.service.ActualSeatPosService", "doUpdate", new object[] { PosEntity, 0, 0 });
if (result.Resultcode == 0)
{
MessageBox.Show("移除成功", "提示");
GetQureyPhysicWH();
ConfigureClassCommon.doActiveSelRow(ultraGrid1, "invPhysic", StrPhysic);
}
else
{
MessageBox.Show("移除失败"+result.Resultmsg,"提示");
}
}
}
else
{
MessageBox.Show("请选择一条需要删除的库位信息行", "提示");
}
}
catch (Exception ex)
{
MessageBox.Show("删除失败:" + ex.Message,"提示");
}
}
///
/// 删除物理库存区信息
///
private void DeleteManWH()// 删除物理库存区信息
{
try
{
if (ultraGrid3.ActiveRow != null)
{
{
String StrPhysic = ultraGrid3.ActiveRow.Cells["invPhysic"].Value.ToString().Trim();
String StrUserId = ultraGrid3.ActiveRow.Cells["userId"].Value.ToString().Trim();
String StruserName = ultraGrid3.ActiveRow.Cells["userName"].Value.ToString().Trim();
String StrId = ultraGrid3.ActiveRow.Cells["id"].Value.ToString().Trim();
if (String.IsNullOrEmpty(StrId))
{
MessageUtil.ShowTips("未获取该行主键,请刷新界面重试");
return;
}
if (String.IsNullOrEmpty(StrPhysic))
{
MessageUtil.ShowTips("未获取到库区编码,请刷新界面重试");
return;
}
if (MessageBox.Show("移除库区[" + StrPhysic + "]的负责人[" + StruserName + "]?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
{
ManRelationEntity ManReEntity = new ManRelationEntity();
ManReEntity.Id = StrId;
ManReEntity.UserId = StrUserId;
ManReEntity.Validflag = "0";
ManReEntity.DeleteName = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
ManReEntity.DeleteUserid = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();
ManReEntity.DeleteTime = DateTime.Now;
CoreResult result = this.execute("com.hnshituo.pur.configure.service.ManRelationService", "doUpdate", new object[] { ManReEntity, 0, 0 });
if (result.Resultcode == 0)
{
MessageBox.Show("移除成功", "提示");
GetQureyPhysicWH();
ConfigureClassCommon.doActiveSelRow(ultraGrid1, "invPhysic", StrPhysic);
}
else
{
MessageBox.Show("移除失败"+result.Resultmsg, "提示");
}
}
}
}
else
{
MessageBox.Show("请选择一条需要删除负责人员信息", "提示");
}
}
catch (Exception ex)
{
MessageBox.Show("删除失败:" + ex.Message,"提示");
}
}
///
/// 编辑物理库区信息
///
private void EditPhysicWH()// 编辑物理库区信息
{
try
{
if (ultraGrid1.ActiveRow != null)
{
String StrPhysic = ultraGrid1.ActiveRow.Cells["invPhysic"].Value.ToString().Trim();
if (StrPhysic != tbxPhysicE.Text.Trim())
{
MessageUtil.ShowTips("库区编码不能修改");
return;
}
//提取物理库区编辑区域信息
string strInvPhysicName = tbxPhysicNameE.Text.ToString().Trim();
if (strInvPhysicName == "")
{
MessageBox.Show("物理库区名称不能为空");
tbxPhysicNameE.Focus();
return;
}
string strAreaE = tbxAreaE.Text.ToString().Trim();
if (strAreaE == "")
{
MessageBox.Show("物理库区所在区域不能为空");
tbxAreaE.Focus();
return;
}
if (comIsStrictE.SelectedIndex == -1)
{
MessageBox.Show("需指定库区是否为严格储位物理库");
comIsStrictE.Focus();
return;
}
if (tbx_isJIT.SelectedIndex == -1)
{
MessageBox.Show("需指定库区是否为JIT库");
tbx_isJIT.Focus();
return;
}
if (tbx_isGYB.SelectedIndex == -1)
{
MessageBox.Show("需指定库区是否为供应部库");
tbx_isGYB.Focus();
return;
}
if (tbx_orgId.Text == "" || tbx_orgName.Text == "")
{
MessageBox.Show("请指定库区所属部门");
tbx_orgName.Focus();
return;
}
PhysicSeatEntity Phouse = new PhysicSeatEntity();
Phouse.InvPhysic = StrPhysic;
Phouse.InvPhysicName = strInvPhysicName;
Phouse.InvLocation = strAreaE;
Phouse.IsStrictBin = comIsStrictE.Value.ToString().Trim();
Phouse.OrgName = tbx_orgName.Text.ToString().Trim();
Phouse.OrgId = tbx_orgId.Text.ToString().Trim();
Phouse.IsJitCk = tbx_isJIT.Value.ToString();
Phouse.IsGybCk = tbx_isGYB.Value.ToString();
if (txt_costCenter.SelectedIndex != -1)
{
Phouse.CostCenter = txt_costCenter.Value.ToString().Trim();
}
Phouse.UpdateName = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
Phouse.UpdateTime = DateTime.Now;
Phouse.UpdateUserid = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();
if (MessageBox.Show("确定修改库区[" + StrPhysic + "]?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK)
{
return;
}
CoreResult result = this.execute("com.hnshituo.pur.configure.service.ActualSeatService", "doUpdate", new object[] { Phouse, 0, 0 });
if (result.Resultcode == 0)
{
MessageBox.Show("修改成功", "提示");
GetQureyPhysicWH();
ConfigureClassCommon.doActiveSelRow(ultraGrid1, "invPhysic", StrPhysic);
}
else
{
MessageBox.Show("修改失败:" + result.Resultmsg, "提示");
}
}
else
{
MessageBox.Show("请选择需要修改的物理库区信息行", "提示");
}
}
catch (Exception ex)
{
MessageBox.Show("修改失败:" + ex.Message,"提示");
}
}
///
/// 新增物理库区信息
///
private void AddPhysicWH()// 新增物理库区信息
{
try
{
//提取物理库区编辑区域信息
string strInvPhysicName = tbxPhysicNameE.Text.ToString().Trim();
if (strInvPhysicName == "")
{
MessageBox.Show("物理库区名称不能为空");
tbxPhysicNameE.Focus();
return;
}
string strInvPhysic = tbxPhysicE.Text.ToString().Trim();
if (strInvPhysic == "")
{
MessageBox.Show("请输入库区编码,库区编号不能为空");
tbxPhysicE.Focus();
return;
}
if (!StringUtil.IsOnlyLetterAndDigit(strInvPhysic))
{
MessageUtil.ShowTips("物理库区编码只允许数字和字母");
tbxPhysicE.Focus();
return;
}
if (strInvPhysic.Length>2)
{
MessageUtil.ShowTips("编码过长,物理库区编号不能大于2位");
tbxPhysicE.Focus();
return;
}
if (comIsStrictE.SelectedIndex==-1)
{
MessageBox.Show("需指定库区是否为严格储位物理库");
comIsStrictE.Focus();
return;
}
if (tbx_isJIT.SelectedIndex == -1)
{
MessageBox.Show("需指定库区是否为JIT库");
tbx_isJIT.Focus();
return;
}
if (tbx_isGYB.SelectedIndex == -1)
{
MessageBox.Show("需指定库区是否为供应部库");
tbx_isGYB.Focus();
return;
}
if (tbx_orgId.Text == "" || tbx_orgName.Text == "")
{
MessageBox.Show("请指定库区所属部门");
tbx_orgName.Focus();
return;
}
string strAreaE = tbxAreaE.Text.ToString().Trim();
PhysicSeatEntity Phouse = new PhysicSeatEntity();
Phouse.InvPhysic = strInvPhysic;
Phouse.InvPhysicName = strInvPhysicName;
Phouse.InvLocation = strAreaE;
Phouse.IsStrictBin = comIsStrictE.Value.ToString().Trim();
Phouse.OrgName = tbx_orgName.Text.ToString().Trim();
Phouse.OrgId = tbx_orgId.Text.ToString().Trim();
Phouse.IsJitCk = tbx_isJIT.Value.ToString();
Phouse.IsGybCk = tbx_isGYB.Value.ToString();
Phouse.Validflag = "1";
if (txt_costCenter.SelectedIndex != -1)
{
Phouse.CostCenter = txt_costCenter.Value.ToString().Trim();
}
Phouse.CreateName = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
Phouse.CreateTime = DateTime.Now;
Phouse.CreateUserid = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();
CoreResult result = this.execute("com.hnshituo.pur.configure.service.ActualSeatService", "AddActualSeat", new object[] { Phouse, 0, 0 });
if (result.Resultcode == 0)
{
MessageBox.Show("新增成功", "提示");
cleanArea();
GetQureyPhysicWH();
ConfigureClassCommon.doActiveSelRow(ultraGrid1, "InvPhysicName", strInvPhysicName);
}
else
{
MessageBox.Show("新增失败"+result.Resultmsg, "提示");
}
}
catch (Exception ex)
{
MessageBox.Show("新增失败:" + ex.Message,"提示");
}
}
///
/// 新增库位
///
private void AddPos()// 新增库位
{
try
{
if (ultraGrid1.ActiveRow == null)
{
MessageUtil.ShowTips("请选择物理库区");
return;
}
string strInvPhysic = ultraGrid1.ActiveRow.Cells["invPhysic"].Value.ToString().Trim();
string strInvPhysicName = ultraGrid1.ActiveRow.Cells["invPhysicName"].Value.ToString().Trim();
if (String.IsNullOrEmpty(strInvPhysic) || String.IsNullOrEmpty(strInvPhysicName))
{
MessageUtil.ShowTips("选择的物理库区编号和名称都不能为空");
return;
}
String strInvPosName = tbxPosNameE.Text.ToString().Trim();
String strInvPos = tbxPosE.Text.Trim();
string strremark = tbxRemarkE.Text.ToString().Trim();
if (strInvPosName == "")
{
MessageBox.Show("库位名称不能为空", "提示");
tbxPosNameE.Focus();
return;
}
ActualSeatPosEntity PosEntity = new ActualSeatPosEntity();
PosEntity.InvPos = strInvPos;
PosEntity.InvPhysicName = strInvPhysicName;
PosEntity.InvPhysic = strInvPhysic;
PosEntity.InvPosName = strInvPosName;
PosEntity.Remark = strremark;
PosEntity.Validflag = "1";
PosEntity.CreateName = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
PosEntity.CreateTime = DateTime.Now;
PosEntity.CreateUserid = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();
CoreResult result = this.execute("com.hnshituo.pur.configure.service.ActualSeatPosService", "addPos", new object[] { PosEntity });
if (result.Resultcode == 0)
{
MessageBox.Show("新增成功", "提示");
cleanArea();
GetQureyPhysicWH();
ConfigureClassCommon.doActiveSelRow(ultraGrid1, "invPhysic", strInvPhysic);
ConfigureClassCommon.doActiveSelRow(ultraGrid2, "invPosName", strInvPosName);
}
else {
MessageBox.Show("新增失败:" + result.Resultmsg, "提示");
}
}
catch (Exception ex)
{
MessageBox.Show("新增绑定库位失败:" + ex.Message, "提示");
}
}
///
/// 新增人员
///
private void AddMan()// 新增人员
{
try
{
if (ultraGrid1.ActiveRow == null)
{
MessageUtil.ShowTips("请选择物理库区");
return;
}
string strInvPhysic = ultraGrid1.ActiveRow.Cells["invPhysic"].Value.ToString().Trim();
string strInvPhysicName = ultraGrid1.ActiveRow.Cells["invPhysicName"].Value.ToString().Trim();
if (String.IsNullOrEmpty(strInvPhysic) || String.IsNullOrEmpty(strInvPhysicName))
{
MessageUtil.ShowTips("选择的物理库区编号和名称都不能为空");
return;
}
String strUser = tbxUserE.Text.ToString().Trim();
string strUserName = tbxUserNameE.Text.ToString().Trim();
if (strUser == "" || strUserName == "")
{
MessageBox.Show("值班人员信息维护错误,编号和人员名都不能为空", "提示");
tbxPhysicNameE.Focus();
return;
}
ManRelationEntity manReEntity = new ManRelationEntity();
manReEntity.UserId = strUser;
manReEntity.UserName = strUserName;
manReEntity.InvPhysic = strInvPhysic;
manReEntity.InvPhysicName = strInvPhysicName;
manReEntity.Validflag = "1";
manReEntity.CreateName = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
manReEntity.CreateUserid = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();
manReEntity.CreateTime = DateTime.Now;
CoreResult result = this.execute("com.hnshituo.pur.configure.service.ManRelationService", "addman", new object[] { manReEntity });
if (result.Resultcode == 0)
{
MessageBox.Show("新增成功", "提示");
cleanArea();
GetQureyPhysicWH();
ConfigureClassCommon.doActiveSelRow(ultraGrid1, "invPhysic", strInvPhysic);
ConfigureClassCommon.doActiveSelRow(ultraGrid3, "userId", strUser);
}
else
{
MessageBox.Show("新增绑定值班人员失败:" + result.Resultmsg, "提示");
}
}
catch (Exception ex)
{
MessageBox.Show("新增绑定值班人员失败:" + ex.Message, "提示");
}
}
#endregion
#region 界面事件
private void ultraGrid1_ClickCell(object sender, Infragistics.Win.UltraWinGrid.ClickCellEventArgs e)
{
dataSet2.Clear();
dataSet3.Clear();
String strInvPhysic = ultraGrid1.ActiveRow.Cells["invPhysic"].Value.ToString().Trim();
if (String.IsNullOrEmpty(strInvPhysic))
{
return;
}
//查询库位信息
ActualSeatPosEntity PosEntity = new ActualSeatPosEntity();
PosEntity.Validflag = "1";
PosEntity.InvPhysic = strInvPhysic;
DataTable dt = this.execute("com.hnshituo.pur.configure.service.ActualSeatPosService", "find", new object[] { PosEntity, 0, 0 });
if (dt != null)
{
GridHelper.CopyDataToDatatable(ref dt, ref dataTable2, true);
GridHelper.RefreshAndAutoSize(ultraGrid2);
}
//查询值班人员信息
ManRelationEntity ManReEntity = new ManRelationEntity();
ManReEntity.Validflag = "1";
ManReEntity.InvPhysic = strInvPhysic;
DataTable dt1 = this.execute("com.hnshituo.pur.configure.service.ManRelationService", "find", new object[] { ManReEntity, 0, 0 });
if (dt1 != null)
{
GridHelper.CopyDataToDatatable(ref dt1, ref dataTable3, true);
GridHelper.RefreshAndAutoSize(ultraGrid3);
}
//填充物理库编辑区
ultraTabControl1.SelectedTab = ultraTabControl1.Tabs[0];
cleanArea();
if (String.IsNullOrEmpty(strInvPhysic))
{
return;
}
PhysicSeatEntity seat = this.execute("com.hnshituo.pur.configure.service.ActualSeatService", "findById", new object[] { strInvPhysic});
if (seat != null)
{
tbxPhysicE.Text = seat.InvPhysic;
tbxPhysicNameE.Text = seat.InvPhysicName;
tbxAreaE.Text = seat.InvLocation;
comIsStrictE.Value = seat.IsStrictBin;
tbx_isJIT.Value = seat.IsJitCk;
tbx_isGYB.Value = seat.IsGybCk;
tbx_orgId.Text = seat.OrgId;
tbx_orgName.Text = seat.OrgName;
txt_costCenter.Value = seat.CostCenter;
}
}
private void ultraGrid1_Click(object sender, EventArgs e)
{
ultraTabControl1.SelectedTab = ultraTabControl1.Tabs[0];
}
private void ultraGrid2_ClickCell(object sender, Infragistics.Win.UltraWinGrid.ClickCellEventArgs e)
{
ultraTabControl1.SelectedTab = ultraTabControl1.Tabs[1];
//填充库位编辑区
cleanArea();
String strID = e.Cell.Row.Cells["ID"].Value.ToString().Trim();
if (String.IsNullOrEmpty(strID))
{
return;
}
ActualSeatPosEntity PosEntity = this.execute("com.hnshituo.pur.configure.service.ActualSeatPosService", "findById", new object[] { strID});
if (PosEntity != null)
{
tbxPosE.Text = PosEntity.Id;
tbxPosNameE.Text = PosEntity.InvPosName;
tbxRemarkE.Text = PosEntity.Remark;
}
}
private void ultraGrid2_Click(object sender, EventArgs e)
{
ultraTabControl1.SelectedTab = ultraTabControl1.Tabs[1];
}
private void ultraGrid3_ClickCell(object sender, Infragistics.Win.UltraWinGrid.ClickCellEventArgs e)
{
ultraTabControl1.SelectedTab = ultraTabControl1.Tabs[2];
cleanArea();
String strID = e.Cell.Row.Cells["ID"].Value.ToString().Trim();
if (String.IsNullOrEmpty(strID))
{
return;
}
ManRelationEntity ManReEntity = this.execute("com.hnshituo.pur.configure.service.ManRelationService", "findById", new object[] { strID});
if (ManReEntity != null)
{
tbxUserE.Text = ManReEntity.UserId;
tbxUserNameE.Text = ManReEntity.UserName;
}
}
private void ultraGrid3_Click(object sender, EventArgs e)
{
ultraTabControl1.SelectedTab = ultraTabControl1.Tabs[2];
}
#endregion
///
/// 清空编辑区
///
private void cleanArea()// 清空编辑区
{
//清空物理库区编辑区信息
tbxPhysicE.Text = "";
tbxPhysicNameE.Text = "";
tbxAreaE.Text = "";
comIsStrictE.SelectedIndex = -1;
tbx_isJIT.SelectedIndex = -1;
tbx_isGYB.SelectedIndex = -1;
tbx_orgId.Text = "";
tbx_orgName.Text = "";
//清楚库位区编辑区信息
tbxPosE.Text = "";
tbxPosNameE.Text = "";
tbxRemarkE.Text = "";
//清空值班人员编辑区信息
tbxUserE.Text = "";
tbxUserNameE.Text = "";
}
///
/// 增加绑定库位
///
///
///
private void AddPosbutton_Click(object sender, EventArgs e)
{
AddPos();
}
///
/// 增加值班人员
///
///
///
private void AddManbutton_Click(object sender, EventArgs e)
{
AddMan();
}
///
/// 选择值班人员
///
///
///
private void ManSelectButton_Click(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
{
SetectManByDept manfrm = new SetectManByDept(this.ob);
manfrm.ShowDialog();
string struserid = manfrm.StrUserID;
string strusername = manfrm.StrUserName;
tbxUserE.Text = struserid;
tbxUserNameE.Text = strusername;
}
///
/// 选择部门
///
///
///
private void tbx_orgName_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
{
frmdepartment frm = new frmdepartment(this.ob);
frm.ShowDialog();
String strdeptId = frm.BuyerUnitCode;
String strDeptName = frm.Fulltext;
if (strdeptId != null && strdeptId != "")
{
tbx_orgId.Text = strdeptId;
tbx_orgName.Text = strDeptName;
}
}
private void AddSitebutton_Click(object sender, EventArgs e)
{
AddPhysicWH();
}
}
}