Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » Date / Time » Downloads
 
Add your own
alternative version

Persian Calendar with Tray Icon

, 12 Mar 2012 CPOL
A Persian calendar that shows a tray icon
traycalande-binary.zip
hijri.mdb
mytray.exe
traycalande-source.zip
traycalande-source
bin
Release
ClassDiagram1.cd
ClassDiagram2.cd
CrystalReport1.rpt
CrystalReport_task.rpt
CrystalReport_taskall.rpt
hijri.mdb
In_DataSet.xsc
In_DataSet.xss
mytray.csproj.user
mytray.csproj.vspscc
mytray.suo
mytray.vssscc
mytray_TemporaryKey.pfx
Properties
Settings.settings
vssver.scc
Resources
icon1.ico
icon10.ico
icon11.ico
icon12.ico
icon13.ico
icon14.ico
icon15.ico
icon16.ico
icon17.ico
icon18.ico
icon19.ico
icon2.ico
icon20.ico
icon21.ico
icon22.ico
icon23.ico
icon24.ico
icon25.ico
icon26.ico
icon27.ico
icon28.ico
icon29.ico
icon3.ico
icon30.ico
icon31.ico
icon4.ico
icon5.ico
icon6.ico
icon7.ico
icon8.ico
icon9.ico
tumb.jpg
vssver.scc
vssver2.scc
��using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

using CrystalDecisions.CrystalReports.Engine;





namespace mytray

{

    public partial class Form_print : Form

    {

        public void Init_Report_all(DataSet dset,string date1,string date2, bool DOneOnly)

        {

            this.CrystalReport_taskall1.SetDataSource(dset);

            ///////filtering start

            string[] ar = date1.Split('/');



            string strFilter = "";



            if(ar[0].Trim()!="")         //strFilter= "{Tasks.Date}>=DateTime ("+ar[0]+","+ ar[1]+","+ ar[2]+", 00, 00, 00)" ;//1387/2/5'";

            strFilter = "{Tasks.Date}>='"+date1+"'";



            ar = date2.Split('/');



            if (strFilter != "" && ar[0]!="")  strFilter += " AND ";

            if (ar[0].Trim() != "") //strFilter += "{Tasks.Date}<=DateTime (" + ar[0] + "," + ar[1] + "," + ar[2] + ", 00, 00, 00)";//1387/2/5'";

                strFilter += "{Tasks.Date}<='" + date2 + "'";



            if (strFilter != "" && DOneOnly == true) strFilter += " AND ";

            if (DOneOnly == true)  strFilter += " {Tasks.Done} = False";// +filter_date + "'";

            if(strFilter!="")      CrystalReport_taskall1.RecordSelectionFormula = strFilter;

            /////////filtering end////////////////////////////////

            TextObject obtxt2 = (TextObject)CrystalReport_taskall1.Section3.ReportObjects["Text6"];

            if (DOneOnly == false) obtxt2.Text+= " � F' *E'E";

            if (date1 != "") obtxt2.Text += "'2 *'1�.";

            obtxt2 = (TextObject)CrystalReport_taskall1.Section3.ReportObjects["txt_date1"];

            if (date1 != "") obtxt2.Text =date1;

            if (date2 != "") obtxt2.Text += "*' *'1�.  ";

            obtxt2 = (TextObject)CrystalReport_taskall1.Section3.ReportObjects["txt_date2"];

            if (date2 != "") obtxt2.Text = date2;

            

            crystalReportViewer1.ReportSource = CrystalReport_taskall1;

        }

        public void Init_Report(DataSet dset,string dayname,string filter_date,bool DOneOnly)

        {

        

            this.CrystalReport_task1.SetDataSource(dset);

            crystalReportViewer1.ReportSource = CrystalReport_task1;

            string[] ar = filter_date.Split('/');



          //  FieldObject ob = (FieldObject)CrystalReport_task1.Section3.ReportObjects["Date1"];

           // CrystalReport_task1.RecordSelectionFormula = "{Tasks.Date} =DateTime (" + ar[0] + "," + ar[1] + "," + ar[2] + ", 00, 00, 00)";//1387/2/5'";

            CrystalReport_task1.RecordSelectionFormula = "{Tasks.Date} ='"+filter_date+"'";//1387/2/5'";

            if (DOneOnly == true)

                CrystalReport_task1.RecordSelectionFormula += " AND {Tasks.Done} = False";// +filter_date + "'";



            TextObject obtxt = (TextObject)CrystalReport_task1.Section3.ReportObjects["txt_date"];

            

            obtxt.Text =filter_date;

            TextObject obtxt2 = (TextObject)CrystalReport_task1.Section3.ReportObjects["txt_dayname"];

            obtxt2.Text =dayname;



                

            //ob.FieldFormat.

        }

            public Form_print()

        {

            InitializeComponent();

             }



            private void CrystalReport_taskall1_InitReport(object sender, EventArgs e)

            {



            }

    }

}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

mohammad hajibegloo
Engineer neyshabur azad univeristy
Iran (Islamic Republic Of) Iran (Islamic Republic Of)
I had worked as programmer,project manager,web developer for more than 3 years, and have worked on programming personaly for more than 10 years.
I have worked in university as a teacher for 8 years.
my favorite langueges are : VC++,C#,ASP.NET,PHP

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141223.1 | Last Updated 12 Mar 2012
Article Copyright 2008 by mohammad hajibegloo
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid