列表shift多选,修复客服无法筛选店铺bug

This commit is contained in:
wule_5900x committed 2026-03-14 21:05:50 +08:00
1 parent b27c473c99
commit 679bae7c42
11 files changed
+272 -110

No files matched your search

@@ -591,36 +591,36 @@ namespace TemuKJD.PDDForms.ProductSelectForms
break;
case "":
dgvDbProduct.Rows[e.RowIndex].Cells["colSelect"].Value = !(bool)dgvDbProduct.Rows[e.RowIndex].Cells["colSelect"].Value;
rowIndex1 = rowIndex2;
rowIndex2 = e.RowIndex;
if (IsShiftDown)
{
if (rowIndex1 > -1 && rowIndex2 > -1)
{
try
{
if (rowIndex1 > rowIndex2)
{
for (int i = rowIndex2; i <= rowIndex1; i++)
{
dgvDbProduct.Rows[i].Cells["colSelect"].Value = dgvDbProduct.Rows[rowIndex1].Cells["colSelect"].Value;
}
}
else
{
for (int i = rowIndex1; i <= rowIndex2; i++)
{
dgvDbProduct.Rows[i].Cells["colSelect"].Value = dgvDbProduct.Rows[rowIndex1].Cells["colSelect"].Value;
}
}
}
catch
{
}
//rowIndex1 = -1;
//rowIndex2 = -1;
}
}
//rowIndex1 = rowIndex2;
//rowIndex2 = e.RowIndex;
//if (IsShiftDown)
//{
// if (rowIndex1 > -1 && rowIndex2 > -1)
// {
// try
// {
// if (rowIndex1 > rowIndex2)
// {
// for (int i = rowIndex2; i <= rowIndex1; i++)
// {
// dgvDbProduct.Rows[i].Cells["colSelect"].Value = dgvDbProduct.Rows[rowIndex1].Cells["colSelect"].Value;
// }
// }
// else
// {
// for (int i = rowIndex1; i <= rowIndex2; i++)
// {
// dgvDbProduct.Rows[i].Cells["colSelect"].Value = dgvDbProduct.Rows[rowIndex1].Cells["colSelect"].Value;
// }
// }
// }
// catch
// {
// }
// //rowIndex1 = -1;
// //rowIndex2 = -1;
// }
//}
break;
default:
break;
@@ -1747,35 +1747,35 @@ namespace TemuKJD.PDDForms.ProductSelectForms
});
}
int rowIndex1 = -1;
int rowIndex2 = -1;
bool IsShiftDown = false;
//int rowIndex1 = -1;
//int rowIndex2 = -1;
//bool IsShiftDown = false;
private void PDDDBProdListForm_KeyDown(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Shift:
case Keys.ShiftKey:
case Keys.LShiftKey:
case Keys.RShiftKey:
IsShiftDown = true;
break;
}
//switch (e.KeyCode)
//{
// case Keys.Shift:
// case Keys.ShiftKey:
// case Keys.LShiftKey:
// case Keys.RShiftKey:
// IsShiftDown = true;
// break;
//}
}
private void PDDDBProdListForm_KeyUp(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.Shift:
case Keys.ShiftKey:
case Keys.LShiftKey:
case Keys.RShiftKey:
IsShiftDown = false;
rowIndex1 = -1;
rowIndex2 = -1;
break;
}
//switch (e.KeyCode)
//{
// case Keys.Shift:
// case Keys.ShiftKey:
// case Keys.LShiftKey:
// case Keys.RShiftKey:
// IsShiftDown = false;
// rowIndex1 = -1;
// rowIndex2 = -1;
// break;
//}
}
private void cmbSourceType_SelectedIndexChanged(object sender, EventArgs e)