예제 #1
0
        private void SetTabPageByType()
        {
            bsMain.EndEdit();

            if (_check.CheckType != querySelect.CheckType)
            {
                #region 换页初始化

                lstMain     = new List <CheckDetailsInfo>();
                querySelect = new CheckDetailsInfo();

                bsSelect.DataSource = querySelect;
                bsSelect.EndEdit();

                lstSelect = new List <CheckDetailsInfo>();
                dgvWarehouse.DataSource      = null;
                dgvHouse.DataSource          = null;
                dgvArea.DataSource           = null;
                dgvMaterial.DataSource       = null;
                dgvKeeperMaterial.DataSource = null;

                cbxWSelectAll.Checked = false;
                cbxHSelectAll.Checked = false;
                cbxASelectAll.Checked = false;
                cbxMSelectAll.Checked = false;
                cbxKSelectAll.Checked = false;
                #endregion
            }

            SetShownControl();
        }
예제 #2
0
        private void dgv_CellEndEdit(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex != 0)
            {
                return;
            }

            DataGridView dgv = sender as DataGridView;

            if (dgv.Name == dgvList.Name)
            {
                return;
            }

            bool bSelect = dgv[e.ColumnIndex, e.RowIndex].Value.ToBoolean();

            if (lstMain == null)
            {
                lstMain = new List <CheckDetailsInfo>();
            }
            CheckDetailsInfo item = lstSelect[e.RowIndex];

            if (bSelect)
            {
                if (_check.CheckType == 5 && lstMain != null && lstMain.Count >= 1)
                {
                    if (lstMain.Exists(t => t.Keeper != item.Keeper))
                    {
                        if (!Common.Common_Func.DialogMessage("当前选中项与已选盘点项的保管员不一致,是否清除之前选择的盘点项?", "提示"))
                        {
                            item.BIsChecked = !item.BIsChecked;
                            return;
                        }
                        else
                        {
                            lstMain = new List <CheckDetailsInfo>();
                        }
                    }
                }

                //if (lstMain.Contains(item)) return;
                CheckDetailsInfo temp = lstMain.FirstOrDefault(t => t.WarehouseNo == item.WarehouseNo && t.HouseNo == item.HouseNo && t.AreaNo == item.AreaNo && t.MaterialNo == item.MaterialNo);
                if (temp != null)
                {
                    return;
                }
                lstMain.Add(item);
            }
            else
            {
                CheckDetailsInfo temp = lstMain.FirstOrDefault(t => t.WarehouseNo == item.WarehouseNo && t.HouseNo == item.HouseNo && t.AreaNo == item.AreaNo && t.MaterialNo == item.MaterialNo);
                if (temp == null)
                {
                    return;
                }

                lstMain.Remove(temp);
            }
        }
예제 #3
0
        public FrmCheckProfitLoss(CheckDetailsInfo detail)
        {
            InitializeComponent();
            showsize = this.Size;
            // TODO: Complete member initialization

            _detail = detail;
        }
예제 #4
0
 private void GetQuerySelect()
 {
     if (querySelect == null)
     {
         querySelect = new CheckDetailsInfo(); bsSelect.DataSource = querySelect;
     }
     querySelect.CheckType = _check.CheckType;
     querySelect.CheckID   = _check.ID;
 }
예제 #5
0
파일: FrmReCheck.cs 프로젝트: xcxlTeam/xcxl
 private void GetQueryMain()
 {
     if (queryMain == null)
     {
         queryMain = new CheckDetailsInfo(); bsMain.DataSource = queryMain;
     }
     queryMain.CheckID   = _check.ID;
     queryMain.CheckType = _check.CheckType;
     queryMain.HaveDiff  = 2;
 }
예제 #6
0
        private void GetQueryMain()
        {
            if (queryMain == null)
            {
                queryMain = new CheckDetailsInfo(); bsMain.DataSource = queryMain;
            }
            queryMain.CheckID   = _check.ID;
            queryMain.CheckType = _check.CheckType;
            if (dtpStartTime.Checked)
            {
                queryMain.StartTime = dtpStartTime.Value;
            }
            else
            {
                queryMain.StartTime = null;
            }
            if (dtpEndTime.Checked)
            {
                queryMain.EndTime = dtpEndTime.Value;
            }
            else
            {
                queryMain.EndTime = null;
            }

            //queryMain.WarehouseNo = "";
            //queryMain.HouseNo = "";
            //queryMain.AreaNo = "";
            //queryMain.MaterialNo = "";
            //if (!string.IsNullOrEmpty(txtAreaNo.Text))
            //{
            //    switch (_check.CheckType)
            //    {
            //        case 1:
            //            queryMain.WarehouseNo = txtAreaNo.Text.Trim();
            //            break;

            //        case 2:
            //            queryMain.HouseNo = txtAreaNo.Text.Trim();
            //            break;

            //        case 3:
            //            queryMain.AreaNo = txtAreaNo.Text.Trim();
            //            break;

            //        case 4:
            //            queryMain.MaterialNo = txtAreaNo.Text.Trim();
            //            break;

            //        case 5:
            //            queryMain.MaterialNo = txtAreaNo.Text.Trim();
            //            break;
            //    }
            //}
        }
예제 #7
0
        private void InitMainQuery()
        {
            _serverMainPage = new DividPage();
            queryMain       = new ProfitLossInfo();
            lstMain         = new List <ProfitLossInfo>();
            if (_detail == null)
            {
                _detail = new CheckDetailsInfo();
            }

            pageList.GetShowCountsByDGV(dgvList);
        }
예제 #8
0
        private void ShowProfitLossForm(int iRowIndex)
        {
            CheckDetailsInfo detail = GetListRowModel(iRowIndex);

            if (detail == null)
            {
                return;
            }

            using (FrmCheckProfitLoss frm = new FrmCheckProfitLoss(detail))
            {
                frm.ShowDialog();
            }
        }
예제 #9
0
        private void InitSelectQuery()
        {
            lstMain     = new List <CheckDetailsInfo>();
            querySelect = new CheckDetailsInfo();

            pageWarehouse.AutoGetRows(dgvWarehouse);
            pageHouse.AutoGetRows(dgvHouse);
            pageArea.AutoGetRows(dgvArea);
            pageMaterial.AutoGetRows(dgvMaterial);
            pageList.AutoGetRows(dgvList);

            bsSelect.DataSource = querySelect;
            bsSelect.EndEdit();
        }
예제 #10
0
파일: FrmReCheck.cs 프로젝트: xcxlTeam/xcxl
        private void InitMainQuery()
        {
            _recheck        = new CheckInfo();
            _serverMainPage = new DividPage();
            queryMain       = new CheckDetailsInfo();
            lstMain         = new List <CheckDetailsInfo>();

            pageList.GetShowCountsByDGV(dgvList);
            bsMain.DataSource  = queryMain;
            bsCheck.DataSource = _check;
            bsCheck.ResetBindings(false);
            bsCheck.EndEdit();

            switch (_check.CheckType)
            {
            case 1:
                colWarehouseNo.Visible   = true;
                colWarehouseName.Visible = true;
                break;

            case 2:
                colHouseNo.Visible   = true;
                colHouseName.Visible = true;
                break;

            case 3:
                colAreaNo.Visible   = true;
                colAreaName.Visible = true;
                break;

            case 4:
                colMaterialNo.Visible   = true;
                colMaterialDesc.Visible = true;
                break;

            case 5:
                colWarehouseNo.Visible   = true;
                colWarehouseName.Visible = true;
                colMaterialNo.Visible    = true;
                colMaterialDesc.Visible  = true;
                break;

            default:
                Common.Common_Func.ErrorMessage("盘点类型传入错误,请重新打开", "错误");
                this.Close();
                break;
            }
        }
예제 #11
0
 private void GetQueryList()
 {
     if (queryList == null)
     {
         queryList = new CheckDetailsInfo();
     }
     queryList.CheckID = _check.ID;
     if (_check.CheckStatus == 1)
     {
         queryList.CheckType = _check.CheckType;
     }
     else
     {
         queryList.CheckType = 0;
     }
 }
예제 #12
0
 public static bool GetCheckAnalyseListByPage(ref List <CheckDetailsInfo> modelList, CheckDetailsInfo model, ref DividPage page, ref string strError)
 {
     return(WMSWebService.service.GetCheckAnalyseListByPage(ref modelList, model, ref page, Common_Var.CurrentUser, ref strError));
 }
예제 #13
0
 public static bool ProfitLossAnalyse(ref List <CheckDetailsInfo> modelList, CheckDetailsInfo model, ref string strError)
 {
     return(WMSWebService.service.ProfitLossAnalyse(ref modelList, model, Common_Var.CurrentUser, ref strError));
 }
예제 #14
0
 public static bool GetCheckDetailsByID(ref CheckDetailsInfo model, ref string strError)
 {
     return(WMSWebService.service.GetCheckDetailsByID(ref model, Common_Var.CurrentUser, ref strError));
 }
예제 #15
0
        private void InitMainQuery()
        {
            _serverMainPage = new DividPage();
            queryMain       = new CheckDetailsInfo();
            lstMain         = new List <CheckDetailsInfo>();

            pageList.GetShowCountsByDGV(dgvList);
            bsMain.DataSource  = queryMain;
            bsCheck.DataSource = _check;
            bsCheck.ResetBindings(false);
            bsCheck.EndEdit();

            if (_check == null || !_check.BIsMainCheck || _check.CheckStatus != 4)
            {
                tsmiDeal.Enabled    = false;
                tsmiReCheck.Enabled = false;
            }

            switch (_check.CheckType)
            {
            case 1:
                lblAreaNo.Text           = "盘点仓库";
                colWarehouseNo.Visible   = true;
                colWarehouseName.Visible = true;
                break;

            case 2:
                lblAreaNo.Text       = "盘点库区";
                colHouseNo.Visible   = true;
                colHouseName.Visible = true;
                break;

            case 3:
                lblAreaNo.Text      = "盘点货位";
                colAreaNo.Visible   = true;
                colAreaName.Visible = true;
                break;

            case 4:
                lblAreaNo.Text           = "盘点物料";
                colWarehouseNo.Visible   = true;
                colWarehouseName.Visible = true;
                colMaterialNo.Visible    = true;
                colMaterialDesc.Visible  = true;
                colMaterialStd.Visible   = true;
                break;

            case 5:
                lblAreaNo.Text           = "盘点物料";
                colWarehouseNo.Visible   = true;
                colWarehouseName.Visible = true;
                colMaterialNo.Visible    = true;
                colMaterialDesc.Visible  = true;
                colMaterialStd.Visible   = true;
                break;

            default:
                Common.Common_Func.ErrorMessage("盘点类型传入错误,请重新打开", "错误");
                this.Close();
                break;
            }
        }