| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 | 
							- using DevComponents.DotNetBar.Layout;
 
- using DevComponents.DotNetBar.SuperGrid;
 
- using System;
 
- using System.Collections.Generic;
 
- using System.ComponentModel;
 
- using System.Data;
 
- using System.Drawing;
 
- using System.Linq;
 
- using System.Text;
 
- using System.Threading.Tasks;
 
- using System.Windows.Forms;
 
- using WCS_Client.UC;
 
- using WCS_Client.Utility;
 
- using WCS_Client.Workflow;
 
- namespace WCS_Client.Frm
 
- {
 
-     public partial class FrmAGVSet : Form
 
-     {
 
-         public FrmAGVSet()
 
-         {
 
-             InitializeComponent();
 
-             InitFrm();
 
-         }
 
-         private void InitFrm()
 
-         {
 
-             List<GridColumn> GCList = new List<GridColumn>()
 
-             {
 
-                 SuperGridUtil.Get_GridColumn("WORKSHOP", "车间", 120),
 
-                 SuperGridUtil.Get_GridColumn("POSITION", "产线", 120),
 
-                 SuperGridUtil.Get_CheckBoxX_GridColumn("INENABLE", "入库启用", 100),
 
-                 SuperGridUtil.Get_CheckBoxX_GridColumn("OUTENABLE", "出库启用", 120),
 
-             };
 
-             List<LayoutControlItem> LCIList = new List<LayoutControlItem>();
 
-             LCIList.Add(LCItemUtil.Add_TextboxX("WORKSHOP", "车间:", 20, SubmitMethods, null));
 
-             LCIList[LCIList.Count - 1].Tag = new LCWhereInfo() { QWhereText = "WORKSHOP like '%{0}%'" };
 
-             LCIList.Add(LCItemUtil.Add_ButtonX("btn_QDB", "查询", 80, 30, SubmitMethods));
 
-             LCIList.Add(LCItemUtil.Add_ButtonX("btn_QClear", "重置", 80, 30, SubmitMethods));
 
-             if (CurrentHelper.User.Use_RoleId == 1)
 
-             {
 
-                 LCIList.Add(LCItemUtil.Add_Button("btn_InEnable", "入库启用", 80, 30, DevComponents.DotNetBar.eButtonColor.BlueWithBackground, SubmitMethods));
 
-                 LCIList.Add(LCItemUtil.Add_Button("btn_OutEnable", "出库启用", 80, 30, DevComponents.DotNetBar.eButtonColor.BlueWithBackground, SubmitMethods));
 
-                 LCIList.Add(LCItemUtil.Add_Button("btn_InStop", "入库停用", 80, 30, DevComponents.DotNetBar.eButtonColor.MagentaWithBackground, SubmitMethods));
 
-                 LCIList.Add(LCItemUtil.Add_Button("btn_OutStop", "出库停用", 80, 30, DevComponents.DotNetBar.eButtonColor.MagentaWithBackground, SubmitMethods));
 
-             }
 
-             uC_QueryPage1.Init_QueryPage(30, true, true, "", GCList, LCIList, QueryPageDataMethods, RefreshRoleMethods, DoubleClikMethod, null, null);
 
-             uC_QueryPage1.ClearLCItemValue();
 
-             CommonShow.ShowProcessing("正在处理中,请稍候...", this, (obj) =>
 
-             {
 
-                 uC_QueryPage1.RefreshData(1, 0);
 
-             }, null);
 
-         }
 
-         private PageData QueryPageDataMethods(int PageIndex, int PageSize)
 
-         {
 
-             string _SQLText = @"SELECT * FROM [WCS_OPP].[dbo].[WCS_AGV_Config]  where 1=1 ";
 
-             string _Orderby = "WORKSHOP asc";
 
-             PageData pd = BaseWorkflow.QueryPageData(_SQLText, _Orderby, uC_QueryPage1.GetQueryWhere(), PageIndex, PageSize);
 
-             return pd;
 
-         }
 
-         private void RefreshRoleMethods(bool ChkValue)
 
-         {
 
-         }
 
-         private void DoubleClikMethod(DataRow dr)
 
-         {
 
-             //wcs_task_no = Convert.ToInt32(dr["TASK_NO"].ToString());
 
-             //FrmWCS_TaskDIS_DTL Frm = new FrmWCS_TaskDIS_DTL(wcs_task_no);
 
-             //Frm.Show();
 
-         }
 
-         private void SubmitMethods(string LCName)
 
-         {
 
-             if (LCName == "btn_QDB")
 
-             {
 
-                 uC_QueryPage1.RefreshData();
 
-             }
 
-             else if (LCName == "btn_QClear")
 
-             {
 
-                 uC_QueryPage1.ShowOpaqueLayer();
 
-                 uC_QueryPage1.ClearLCItemValue();
 
-                 uC_QueryPage1.RefreshData(1, 0);
 
-                 uC_QueryPage1.HideOpaqueLayer();
 
-             }
 
-             else if (LCName == "btn_InEnable")
 
-             {
 
-                 DataTable dt = this.uC_QueryPage1.SCGrid_GetChkRows();
 
-                 if (dt == null || dt.Rows.Count == 0)
 
-                 {
 
-                     MessageUtil.ShowTips("请选择配置信息。");
 
-                     return;
 
-                 }
 
-                 string proLine = dt.Rows[0]["POSITION"].ToString();
 
-                 int convNo1 = (int)dt.Rows[0]["ID"];
 
-                 var result = MessageUtil.ShowYesNoAndWarning(string.Format("[{0}]产线确定要启用入库功能吗?", proLine));
 
-                 if (result == DialogResult.Yes)
 
-                 {
 
-                     string msg = SystemConfigWorkflow.AgvSet(proLine, true, LCName);
 
-                     MessageUtil.ShowTips(msg);
 
-                     uC_QueryPage1.RefreshData(1, 0);
 
-                 }
 
-             }
 
-             else if (LCName == "btn_InStop")
 
-             {
 
-                 DataTable dt = this.uC_QueryPage1.SCGrid_GetChkRows();
 
-                 if (dt == null || dt.Rows.Count == 0)
 
-                 {
 
-                     MessageUtil.ShowTips("请选择配置信息。");
 
-                     return;
 
-                 }
 
-                 //int convNo = (int)dt.Rows[0]["WORKSHOP"];
 
-                 string proLine = dt.Rows[0]["POSITION"].ToString();
 
-                 var result = MessageUtil.ShowYesNoAndWarning(string.Format("[{0}]产线确定要禁用入库功能吗?", proLine));
 
-                 if (result == DialogResult.Yes)
 
-                 {
 
-                     string msg = SystemConfigWorkflow.AgvSet(proLine, false, LCName);
 
-                     MessageUtil.ShowTips(msg);
 
-                     uC_QueryPage1.RefreshData(1, 0);
 
-                 }
 
-             }
 
-             else if (LCName == "btn_OutEnable")
 
-             {
 
-                 DataTable dt = this.uC_QueryPage1.SCGrid_GetChkRows();
 
-                 if (dt == null || dt.Rows.Count == 0)
 
-                 {
 
-                     MessageUtil.ShowTips("请选择配置信息。");
 
-                     return;
 
-                 }
 
-                 //int convNo = (int)dt.Rows[0]["WORKSHOP"];
 
-                 string proLine = dt.Rows[0]["POSITION"].ToString();
 
-                 var result = MessageUtil.ShowYesNoAndWarning(string.Format("[{0}]号车间确定要启用出库功能吗?", proLine));
 
-                 if (result == DialogResult.Yes)
 
-                 {
 
-                     string msg = SystemConfigWorkflow.AgvSet(proLine, true, LCName);
 
-                     MessageUtil.ShowTips(msg);
 
-                     uC_QueryPage1.RefreshData(1, 0);
 
-                 }
 
-             }
 
-             else if (LCName == "btn_OutStop")
 
-             {
 
-                 DataTable dt = this.uC_QueryPage1.SCGrid_GetChkRows();
 
-                 if (dt == null || dt.Rows.Count == 0)
 
-                 {
 
-                     MessageUtil.ShowTips("请选择配置信息。");
 
-                     return;
 
-                 }
 
-                 //int convNo = (int)dt.Rows[0]["WORKSHOP"];
 
-                 string proLine = dt.Rows[0]["POSITION"].ToString();
 
-                 var result = MessageUtil.ShowYesNoAndWarning(string.Format("[{0}]产线确定要禁用出库功能吗?", proLine));
 
-                 if (result == DialogResult.Yes)
 
-                 {
 
-                     string msg = SystemConfigWorkflow.AgvSet(proLine, false, LCName);
 
-                     MessageUtil.ShowTips(msg);
 
-                     uC_QueryPage1.RefreshData(1, 0);
 
-                 }
 
-             }
 
-         }
 
-     }
 
- }
 
 
  |