Beispiel #1
0
 public static DataTable InsertUpdateFeeVouchers(BusinessEntities.FeeVouchers objFeeVouchers)
 {
     try
     {
         DataKernal.FeeVouchers objDFeeVouchers = new DataKernal.FeeVouchers();
         return(objDFeeVouchers.InsertUpdateFeeVouchers(objFeeVouchers.VoucherID, objFeeVouchers.StudentID, objFeeVouchers.DateVoucherIssue, objFeeVouchers.DateVoucherSubmit, objFeeVouchers.CollectedFee, objFeeVouchers.UserID, objFeeVouchers.IsEnabled, objFeeVouchers.Remarks).Tables[0]);
     }
     catch (System.Exception ex)
     {
         return(null);
     }
 }
 private void txtSubmit_Click(object sender, EventArgs e)
 {
     if (lblChallanID.Text != "")
     {
         DataTable dtChallan = LogicKernal.FeeVouchers.GetFeeVouchersByID(Convert.ToInt16(lblChallanID.Text));
         BusinessEntities.FeeVouchers ObjVoucher = new BusinessEntities.FeeVouchers();
         ObjVoucher.VoucherID         = Convert.ToInt16(lblChallanID.Text);
         ObjVoucher.StudentID         = Convert.ToInt16(dtChallan.Rows[0]["StudentID"]);
         ObjVoucher.DateVoucherIssue  = Convert.ToDateTime(dtChallan.Rows[0]["DateVoucherIssue"]);
         ObjVoucher.CollectedFee      = dtChallan.Rows[0]["CollectedFee"].ToString();
         ObjVoucher.Remarks           = txtRemarks.Text;
         ObjVoucher.IsEnabled         = false;
         ObjVoucher.UserID            = LogicKernal.Users.LoginInfo.UserID;
         ObjVoucher.DateVoucherSubmit = txtSubmittedDate.Text;
         if (LogicKernal.FeeVouchers.InsertUpdateFeeVouchers(ObjVoucher).Rows.Count > 0)
         {
             MessageBox.Show("Voucher Submitted Successfuly...");
             UnpaidVouchers();
             lblChallanID.Text     = "";
             txtAddress.Text       = "";
             txtCNIC.Text          = "";
             txtContactNo.Text     = "";
             txtFatherName.Text    = "";
             txtRemarks.Text       = "";
             txtStudentName.Text   = "";
             txtSubmittedDate.Text = "";
         }
         else
         {
             MessageBox.Show("Error. Try Again....");
         }
     }
     else
     {
         MessageBox.Show("Please Select a Voucher First.....!!");
     }
 }
Beispiel #3
0
        private void pdPrintDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
        {
            BusinessEntities.FeeVouchers ObjFeeVoucher = new BusinessEntities.FeeVouchers();
            ObjFeeVoucher.VoucherID         = 0;
            ObjFeeVoucher.StudentID         = Convert.ToInt16(cmbStudents.SelectedValue);
            ObjFeeVoucher.CollectedFee      = txtFee.Text;
            ObjFeeVoucher.DateVoucherIssue  = DateTime.Now;
            ObjFeeVoucher.DateVoucherSubmit = "";
            ObjFeeVoucher.IsEnabled         = true;
            ObjFeeVoucher.Remarks           = "";
            ObjFeeVoucher.UserID            = LogicKernal.Users.LoginInfo.UserID;
            DataTable dtInserted = LogicKernal.FeeVouchers.InsertUpdateFeeVouchers(ObjFeeVoucher);

            if (dtInserted.Rows.Count > 0)
            {
                e.Graphics.Clear(SystemColors.Control);
                e.Graphics.RotateTransform(90);
                e.Graphics.DrawString("Islamia University Bahawalpur", new Font("Arial", 15, FontStyle.Bold), SystemBrushes.ControlText, 20, -800);
                e.Graphics.DrawString("Phone No.   03007027795", new Font("Arial", 10, FontStyle.Regular), SystemBrushes.ControlText, 70, -765);
                e.Graphics.DrawString("--------------------------------------------------------------------", new Font("Arial", 10, FontStyle.Regular), SystemBrushes.ControlText, 10, -785);
                e.Graphics.DrawString("--------------------------------------------------------------------", new Font("Arial", 10, FontStyle.Regular), SystemBrushes.ControlText, 10, -780);
                e.Graphics.DrawString("Challan No: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 40, -700);
                e.Graphics.DrawString(dtInserted.Rows[0]["Column1"].ToString(), new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 140, -700);
                e.Graphics.DrawString("A/C " + "0641852583686", new Font("Arial", 8, FontStyle.Bold), SystemBrushes.ControlText, 120, -730);


                e.Graphics.DrawString("Student Name: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 40, -600);
                e.Graphics.DrawString(cmbStudents.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 140, -600);
                e.Graphics.DrawString("Father Name: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 40, -550);
                e.Graphics.DrawString(txtFatherName.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 140, -550);
                e.Graphics.DrawString("CNIC/B-Form: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 40, -500);
                e.Graphics.DrawString(txtCnic.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 140, -500);
                e.Graphics.DrawString("Address: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 40, -450);
                e.Graphics.DrawString(txtCnic.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 140, -450);
                e.Graphics.DrawString("Admission Fee: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 40, -300);
                e.Graphics.DrawString("RS." + txtFee.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 140, -300);
                e.Graphics.DrawString("Date Issue: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 40, -250);
                e.Graphics.DrawString(DateTime.Now.ToShortDateString(), new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 140, -250);


                e.Graphics.DrawString("Islamia University Bahawalpur", new Font("Arial", 15, FontStyle.Bold), SystemBrushes.ControlText, 360, -800);
                e.Graphics.DrawString("Phone No.   03007027795", new Font("Arial", 10, FontStyle.Regular), SystemBrushes.ControlText, 410, -770);
                e.Graphics.DrawString("--------------------------------------------------------------------", new Font("Arial", 10, FontStyle.Regular), SystemBrushes.ControlText, 360, -785);
                e.Graphics.DrawString("--------------------------------------------------------------------", new Font("Arial", 10, FontStyle.Regular), SystemBrushes.ControlText, 360, -780);
                e.Graphics.DrawString("Challan No: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 380, -700);
                e.Graphics.DrawString(dtInserted.Rows[0]["Column1"].ToString(), new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 480, -700);
                e.Graphics.DrawString("A/C " + "0641852583686", new Font("Arial", 8, FontStyle.Bold), SystemBrushes.ControlText, 460, -730);

                e.Graphics.DrawString("Student Name: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 380, -600);
                e.Graphics.DrawString(cmbStudents.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 480, -600);
                e.Graphics.DrawString("Father Name: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 380, -550);
                e.Graphics.DrawString(txtFatherName.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 480, -550);
                e.Graphics.DrawString("CNIC/B-Form: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 380, -500);
                e.Graphics.DrawString(txtCnic.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 480, -500);
                e.Graphics.DrawString("Address: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 380, -450);
                e.Graphics.DrawString(txtCnic.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 480, -450);
                e.Graphics.DrawString("Admission Fee: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 380, -300);
                e.Graphics.DrawString("RS." + txtFee.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 480, -300);
                e.Graphics.DrawString("Date Issue: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 380, -250);
                e.Graphics.DrawString(DateTime.Now.ToShortDateString(), new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 480, -250);


                e.Graphics.DrawString("Islamia University Bahawalpur", new Font("Arial", 15, FontStyle.Bold), SystemBrushes.ControlText, 710, -800);
                e.Graphics.DrawString("Phone No.   03007027795", new Font("Arial", 10, FontStyle.Regular), SystemBrushes.ControlText, 760, -770);

                e.Graphics.DrawString("--------------------------------------------------------------------", new Font("Arial", 10, FontStyle.Regular), SystemBrushes.ControlText, 710, -785);
                e.Graphics.DrawString("--------------------------------------------------------------------", new Font("Arial", 10, FontStyle.Regular), SystemBrushes.ControlText, 710, -780);
                e.Graphics.DrawString("Challan No: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 720, -700);
                e.Graphics.DrawString(dtInserted.Rows[0]["Column1"].ToString(), new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 820, -700);
                e.Graphics.DrawString("A/C " + "0641852583686", new Font("Arial", 8, FontStyle.Bold), SystemBrushes.ControlText, 800, -730);

                e.Graphics.DrawString("Student Name: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 720, -600);
                e.Graphics.DrawString(cmbStudents.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 820, -600);
                e.Graphics.DrawString("Father Name: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 720, -550);
                e.Graphics.DrawString(txtFatherName.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 820, -550);
                e.Graphics.DrawString("CNIC/B-Form: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 720, -500);
                e.Graphics.DrawString(txtCnic.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 820, -500);
                e.Graphics.DrawString("Address: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 720, -450);
                e.Graphics.DrawString(txtCnic.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 820, -450);
                e.Graphics.DrawString("Admission Fee: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 720, -300);
                e.Graphics.DrawString("RS." + txtFee.Text, new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 820, -300);
                e.Graphics.DrawString("Date Issue: ", new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 720, -250);
                e.Graphics.DrawString(DateTime.Now.ToShortDateString(), new Font("Arial", 8, FontStyle.Regular), SystemBrushes.ControlText, 820, -250);
            }
            else
            {
                MessageBox.Show("Try Again");
            }
        }