public void ShowReportUserForm() { //if (JPermission.CheckPermission("Bascol.JReport.ShowReportUserForm", true)) //{ JReportUserForm p = new JReportUserForm(); p.ShowDialog(); //} }
private void linkLabel1_Click(object sender, EventArgs e) { if (!((txtPlak1.Text != "") && (cmbPlak.Text != "") && (txtPlak2.Text != "") && (txtPlak3.Text != "") && (txtPlak1.Text.Length == 2) && (txtPlak2.Text.Length == 3) && (txtPlak3.Text.Length == 2))) { JMessages.Error(" شماره پلاک را وارد کنید ", ""); txtPlak1.Focus(); return; } JReportUserForm pUser = new JReportUserForm(txtPlak1.Text + cmbPlak.Text + txtPlak2.Text + "-" + txtPlak3.Text, true); pUser.ShowDialog(); }
private void btnKhales_Click(object sender, EventArgs e) { if (!((txtPlak1.Text != "") && (cmbPlak.Text != "") && (txtPlak2.Text != "") && (txtPlak3.Text != "") && (txtPlak1.Text.Length == 2) && (txtPlak2.Text.Length == 3) && (txtPlak3.Text.Length == 2))) { JMessages.Error(" شماره پلاک را وارد کنید ", ""); txtPlak1.Focus(); return; } bool Flag = true; if (ClassLibrary.JPing.Ping("192.168.3.1")) { JReportUserForm pUser = new JReportUserForm(txtPlak1.Text + cmbPlak.Text + txtPlak2.Text + "-" + txtPlak3.Text); if (pUser.ShowDialog() == DialogResult.OK) { Flag = false; _WeightKhales = pUser._Weight; JEmptyWeight tmp = new JEmptyWeight(); tmp.BascoolNo = Convert.ToInt32(lblBascolNum.Text); tmp.EmptyBascoolNo = pUser._BascolCode; tmp.DateWeight = pUser._Date; tmp.EmptyWeight = pUser._Weight; _Counter = JWeights.GetCounter(); tmp.WeightID = _Counter; if (tmp.WeightID == 0) { JMessages.Error(" خطا در شماره سریال قبض ", ""); return; } if (JMessages.Confirm(" وزن " + tmp.EmptyWeight.ToString(), "") == DialogResult.Yes) { if (tmp.Insert() > 0) { FlagKhales = false; btnSabt_Click(null, null); FlagKhales = true; } else { JMessages.Error(" با موفقیت ثبت نشد ", ""); } _Counter = 0; } } } if (Flag) { JKhalesWeightForm p = new JKhalesWeightForm(); if (p.ShowDialog() == DialogResult.OK) { _WeightKhales = p._Weight; JEmptyWeight tmp = new JEmptyWeight(); tmp.BascoolNo = Convert.ToInt32(lblBascolNum.Text); tmp.EmptyBascoolNo = p._BascolCode; tmp.DateWeight = p._Date; tmp.EmptyWeight = p._Weight; _Counter = JWeights.GetCounter(); tmp.WeightID = _Counter; if (tmp.WeightID == 0) { JMessages.Error(" خطا در شماره سریال قبض ", ""); return; } if (tmp.Insert() > 0) { FlagKhales = false; btnSabt_Click(null, null); FlagKhales = true; } else { JMessages.Error(" با موفقیت ثبت نشد ", ""); } _Counter = 0; } } }
private void btnPrint2_Click(object sender, EventArgs e) { JReportUserForm p = new JReportUserForm(true); p.ShowDialog(); }