public static void Determaine(string source) { string title = "ఛందోగణనం"; string caption = "ఛందం © తో పద్య సాహిత్యం మరింత రసమయం..!! [http://chandam.apphb.com] "; string s = File.ReadAllText(source); string s2 = Eval.Build(s); string s3 = BuildHTML(title, s2, false); s3 = ReWrite(s3); File.WriteAllText(source + ".html", s3, Encoding.UTF8); PDFOptions Options = PDFOptions.Default; Options.Caption = caption; Options.Title = title; new PDFUtil(Options).HTML2PDF(source + ".html", source + ".pdf"); }
public void Go() { DataTable dt = DBUtil.ExecuteQuery("select * from ns where Padyam2 is null", Databases.Core); foreach (DataRow dr in dt.Rows) { this.Open( ); int Id = ( int )dr["id"]; string sPadyam = ( string )dr["Padyam"]; string PadyamType = ( string )dr["PTypeEn"]; int percentage = 0; string name = ""; string PadyamFormatted = Eval.Build(sPadyam, PadyamType, out name, out percentage); bool done = false; if (percentage < 100 && percentage > 0) { //Probable Pr=Padyam.MostProbable ( sPadyam , MatchOptions.QucikMatchSettings ); //if ( Pr.MatchResult == null ) //{ // Debugger.Break ( ); //} //MatchResult MR= Pr.MatchResult; //Library.Chandam.Rule R=Pr.Rule; //Padyam P =Pr.Padyam; //percentage = MR.Percentage; //PadyamFormatted = P.Build2 ( MR ); //done = DBUtil.ExecuteNonQuery ( "update ns set PTypeTe=@PTypeTe,ptypeCalc=@ptypeCalc,padyam2=@padyam,MatchPercentage=@percentage where id=@id" , // new SqlParameter[] { // new MySqlParam("padyam",SqlDbType.NVarChar,PadyamFormatted).SqlParameter, // new MySqlParam("id",SqlDbType.Int,Id).SqlParameter, // new MySqlParam("percentage",SqlDbType.Int,percentage).SqlParameter, // new MySqlParam("ptypeCalc",SqlDbType.VarChar,R.Identifier).SqlParameter, // new MySqlParam("PTypeTe",SqlDbType.NVarChar,R.ShortName).SqlParameter, // } , // Databases.Core , this.Connection , this.Transaction ); } //else { done = DBUtil.ExecuteNonQuery("update ns set PTypeTe=@PTypeTe,padyam2=@padyam,MatchPercentage=@percentage where id=@id", new SqlParameter[] { new MySqlParam("padyam", SqlDbType.NVarChar, PadyamFormatted).SqlParameter, new MySqlParam("id", SqlDbType.Int, Id).SqlParameter, new MySqlParam("percentage", SqlDbType.Int, percentage).SqlParameter, new MySqlParam("PTypeTe", SqlDbType.NVarChar, name).SqlParameter, }, Databases.Core, this.Connection, this.Transaction); } if (done) { this.Commit( ); Console.Write("\r Done with: " + Id); } this.Close( ); } Console.WriteLine("\r Done with DB Updates"); }