private bool cboStoresZonesTypesTarget_Restore() { oStoreZoneTarget.FillTableStoresZonesTypes(); cboStoresZonesTypesTarget.ValueMember = oStoreZoneTarget.TableStoresZonesTypes.Columns[0].Caption; cboStoresZonesTypesTarget.DisplayMember = oStoreZoneTarget.TableStoresZonesTypes.Columns[1].Caption; cboStoresZonesTypesTarget.DataSource = oStoreZoneTarget.TableStoresZonesTypes; return(oStoreZoneTarget.ErrorNumber == 0); }
private void btnStoresZonesTypesChoose_Click(object sender, EventArgs e) { _SelectedIDList = null; _SelectedText = ""; StoreZone oStoreZone = new StoreZone(); oStoreZone.FillTableStoresZonesTypes(); if (oStoreZone.ErrorNumber != 0 || oStoreZone.TableStoresZonesTypes == null) { RFMMessage.MessageBoxError("ќшибка при получении данных о типах зон склада..."); return; } if (oStoreZone.TableStoresZonesTypes.Rows.Count == 0) { RFMMessage.MessageBoxError("Ќет данных о типах зон склада..."); return; } if (StartForm(new frmSelectID(this, oStoreZone.TableStoresZonesTypes, "Name", "“ип скл.зоны", true)) == DialogResult.Yes) { if (_SelectedIDList == null || !_SelectedIDList.Contains(",")) { btnStoresZonesTypesClear_Click(null, null); return; } if (((RFMButton)sender).Name.Contains("Source")) { sSelectedStoresZonesTypesSourceIDList = "," + _SelectedIDList; txtStoresZonesTypesSourceChoosen.Text = _SelectedText; ttToolTip.SetToolTip(txtStoresZonesTypesSourceChoosen, txtStoresZonesTypesSourceChoosen.Text); } if (((RFMButton)sender).Name.Contains("Target")) { sSelectedStoresZonesTypesTargetIDList = "," + _SelectedIDList; txtStoresZonesTypesTargetChoosen.Text = _SelectedText; ttToolTip.SetToolTip(txtStoresZonesTypesTargetChoosen, txtStoresZonesTypesTargetChoosen.Text); } tabTrafficsFrames.IsNeedRestore = true; tabTrafficsGoods.IsNeedRestore = true; tabInputsFrames.IsNeedRestore = true; } _SelectedIDList = null; _SelectedText = ""; }
private bool cboStoresZonesTypes_Restore() { oStoreZone.FilterStoreZoneTypeForStorage = true; oStoreZone.FillTableStoresZonesTypes(); /* * oStoreZone.FilterStoreZoneTypeShortCode = "PICK"; * oStoreZone.FillTableStoresZonesTypes(); * DataTable dt = oStoreZone.TableStoresZonesTypes.Copy(); * oStoreZone.FilterStoreZoneTypeShortCode = "STOR"; * oStoreZone.FillTableStoresZonesTypes(); * foreach (DataRow dr in dt.Rows) * oStoreZone.TableStoresZonesTypes.ImportRow(dr); * dt.Clear(); */ cboStoresZonesTypes.ValueMember = oStoreZone.TableStoresZonesTypes.Columns[0].Caption; cboStoresZonesTypes.DisplayMember = oStoreZone.TableStoresZonesTypes.Columns[1].Caption; cboStoresZonesTypes.DataSource = oStoreZone.TableStoresZonesTypes; return(oStoreZone.ErrorNumber == 0); }
private void frmSelectOneCell_Load(object sender, EventArgs e) { if (useCheck) { Text = "¬ыберите несколько ¤чеек"; } else { Text = "¬ыберите ¤чейку"; } bool lResult = cboCBuilding_Restore() && cboCLine_Restore() && cboCLevel_Restore() && cboCRack_Restore() && cboCPlace_Restore(); oStoreZone.FillData(); oStoreZone.FillTableStoresZonesTypes(); if (sStoresZonesList != null) { string sStoresZonesText = ""; foreach (DataRow sz in oStoreZone.MainTable.Rows) { if (((string)("," + sStoresZonesList + ",")).Contains("," + sz["ID"].ToString().Trim() + ",")) { sStoresZonesText += ", " + sz["Name"].ToString(); } } if (sStoresZonesText.Substring(0, 1) == ",") { sStoresZonesText = sStoresZonesText.Substring(2).Trim(); } txtStoresZonesChoosen.Text = sStoresZonesText; } cntData.SplitterDistance = 0; cntData.Panel1MinSize = 0; //lblTreeWait.Visible = false; }