private void btnBatch_Click(object sender, EventArgs e) { ScheduleDal scheduleDal = new ScheduleDal(); TableDialogDal dialogDal = new TableDialogDal(); //SelectDialog selectDialog = new SelectDialog(scheduleDal.GetSchedule(), dialogDal.GetField("SCHEDULE"), false); SelectDialog selectDialog = new SelectDialog(scheduleDal.GetNoneInSchedule(), dialogDal.GetField("SCHEDULE"), false); if (selectDialog.ShowDialog() == DialogResult.OK) { //if (selectDialog.SelectedValue["FORMULACODE"].Trim().Length != 0) //{ txtScheduleNo.Text = selectDialog.SelectedValue["SCHEDULENO"]; //} //else // THOKUtil.ShowInfo("�������õ�ǰ�����ƻ���Ӧ�õ��䷽����"); } }
private void btnRefresh_Click(object sender, EventArgs e) { try { TableDialogDal dialogDal = new TableDialogDal(); fields = dialogDal.GetField("FORMULAMASTER"); ScheduleDal scheduleDal = new ScheduleDal(); bsMain.DataSource = scheduleDal.GetSchedule(); DataGridViewAutoFilter.DataGridViewAutoFilterTextBoxColumn.RemoveFilter(dgvMain); } catch (Exception exp) { THOKUtil.ShowInfo("���������ƻ�����ʧ�ܣ�ԭ��" + exp.Message); } }
private void Initialize() { TableDialogDal dialogDal = new TableDialogDal(); areaFields = dialogDal.GetField("AREA"); areaTable = new AreaDal().GetArea(); btnSave.Enabled = canSave; btnAddRow.Enabled = canSave; btnDeleteRow.Enabled = canSave; dgvDetail.ReadOnly = !canSave; dgvDetail.AllowUserToAddRows = canSave; dgvDetail.AllowUserToDeleteRows = canSave; }
private void Initialize() { TableDialogDal dialogDal = new TableDialogDal(); productFields = dialogDal.GetField("PRODUCT"); areaFields = dialogDal.GetField("AREA"); scheduleFields = dialogDal.GetField("SCHEDULE"); areaTable = new AreaDal().GetArea(); cbBillType.DataSource = new BillTypeDal().GetBillByType("6"); cbTarget.DataSource = new PortDal().GetPort("2"); cbTarget.SelectedValue = "2"; btnSave.Enabled = canSave; btnDeleteRow.Enabled = canSave; dgvDetail.ReadOnly = !canSave; dgvDetail.AllowUserToAddRows = canSave; dgvDetail.AllowUserToDeleteRows = canSave; }
private void Initialize() { CellDal cellDal = new CellDal(); switch (billType) { case "3": REALQUANTITY.Visible = true; NEWCELL.Visible = false; Text = "�̵㵥"; break; case "4": REALQUANTITY.Visible = false; NEWCELL.Visible = false; Text = "��쵥"; break; case "5": REALQUANTITY.Visible = false; NEWCELL.Visible = true; Text = "�ƿⵥ"; freeCellTable = cellDal.GetUnusedCell(); break; } TableDialogDal dialogDal = new TableDialogDal(); scheduleFields = dialogDal.GetField("SCHEDULE"); areaFields = dialogDal.GetField("AREA"); areaTable = new AreaDal().GetArea(); cellFields = dialogDal.GetField("CELL"); cellTable = cellDal.GetUsedCell(); cbBillType.DataSource = new BillTypeDal().GetBillByType(billType); cbTarget.DataSource = new PortDal().GetPort(billType); btnSave.Enabled = canSave; btnDeleteRow.Enabled = canSave; dgvDetail.ReadOnly = !canSave; dgvDetail.AllowUserToAddRows = canSave; dgvDetail.AllowUserToDeleteRows = canSave; }