private void btnBillAdd_Click(object sender, EventArgs e) { selection1.ClearSelection(); selection2.ClearSelection(); FrmClientTuoShouJTAdd frm = new FrmClientTuoShouJTAdd("0"); frm.Text = "集团客户托收单增加"; frm.Tag = "JT_KHTSD_ADD"; if (frm.ShowDialog() == DialogResult.OK) { unitOfWork1.DropIdentityMap(); xpServerCollectionSource1.Reload(); } }
private void btnBillAlter_Click(object sender, EventArgs e) { bool check = false; if (selection1.SelectedCount == 0) { check = false; MessageBox.Show("请选择要修改的采购销售单"); } else if (selection1.SelectedCount != 1) { check = false; MessageBox.Show("每次只能修改一张采购销售单"); } else { check = true; } if (check == true) { bool fgshowfrom = false; int RowIndex = selection1.GetSelectedRowIndex(0); int RowHandle = gridView1.GetRowHandle(RowIndex); string strZT = gridView1.GetRowCellDisplayText(RowHandle, colZT).ToString().Trim(); string strZTID = gridView1.GetRowCellValue(RowHandle, colZTID).ToString(); string strXSTSDID = gridView1.GetRowCellValue(RowHandle, colXSTSDID).ToString(); string strCZYID = gridView1.GetRowCellDisplayText(RowHandle, colCZYID).ToString().Trim(); if (strZT != "02") { fgshowfrom = false; MessageBox.Show("只有存盘状态下的结算单才可以被修改"); } else if (strZTID != FrmLogin.getZTID.ToString()) { fgshowfrom = false; MessageBox.Show("只有自己帐套下的结算单才可以被修改"); } else if (strCZYID != FrmLogin.getUserID.ToString()) { fgshowfrom = false; MessageBox.Show("只有自己新建的结算单才可以被修改"); } else { fgshowfrom = true; } if (fgshowfrom == true) { FrmClientTuoShouJTAdd frm = new FrmClientTuoShouJTAdd(strXSTSDID); frm.Text = "集团——客户托收单——修改"; frm.Tag = "JT_KHTSD_ALTER"; if (frm.ShowDialog() == DialogResult.OK) { selection1.ClearSelection(); SelectCountClear(); unitOfWork1.DropIdentityMap(); xpServerCollectionSource1.Reload(); gridView1.BestFitColumns(); } } } }
private void btnBillLook_Click(object sender, EventArgs e) { bool check = false; if (selection1.SelectedCount == 0) { check = false; MessageBox.Show("请选择要查看的采购销售单"); } else if (selection1.SelectedCount != 1) { check = false; MessageBox.Show("每次只能查看一张采购销售单"); } else { check = true; } if (check == true) { int RowIndex = selection1.GetSelectedRowIndex(0); int RowHandle = gridView1.GetRowHandle(RowIndex); string strXSTSDID = gridView1.GetRowCellValue(RowHandle, colXSTSDID).ToString(); FrmClientTuoShouJTAdd frm = new FrmClientTuoShouJTAdd(strXSTSDID); frm.Text = "集团——客户托收单——查看"; frm.Tag = "JT_KHTSD_LOOK"; if (frm.ShowDialog() == DialogResult.OK) { selection1.ClearSelection(); SelectCountClear(); unitOfWork1.DropIdentityMap(); xpServerCollectionSource1.Reload(); gridView1.BestFitColumns(); } } }