コード例 #1
0
 public override string ToString()
 {
     Gabriel.Cat.text toString = "";
     toString += "\nId ingredient: " + PrimaryKey;
     toString += "\nId recepta: ";
     if (Recepta == null)
     {
         toString += IdReceptaPerPosar;
     }
     else
     {
         toString += Recepta.PrimaryKey;
     }
     toString += "\nId producte: ";
     if (Producte == null)
     {
         toString += IdProductePerPosar;
     }
     else
     {
         toString += Producte.PrimaryKey;
     }
     toString += "\nQuantitat: " + Quantitat;
     return(toString);
 }
コード例 #2
0
ファイル: Estoc.cs プロジェクト: OldNet/Gabriel.Cat.Estoc
 public override string ToString()
 {
     Gabriel.Cat.text toString = "Productes en estoc\n";
     foreach (Producte producte in this)
     {
         toString += "\n" + producte;
         toString += "\nEs poden fer: " + producte.EsPodenFer(this);
         toString += "\nCom a maxim pot haver: " + producte.MaximQuePotHaver(this);
     }
     return(toString);
 }
コード例 #3
0
 public override string ToString()
 {
     Gabriel.Cat.text toString = "";
     toString += "\nId recepta: " + PrimaryKey;
     toString += "\nIngredients:";
     if (ingredients.Count != 0)
     {
         foreach (Ingredient ingredient in this)
         {
             toString += "\n" + ingredient;
         }
     }
     else
     {
         toString += "\nNo te ingredients";
     }
     return(toString);
 }
コード例 #4
0
 public override string ToString()
 {
     Gabriel.Cat.text toString = "";
     toString += "\nId unitat: " + PrimaryKey;
     toString += "\nId producte: " + Producte.PrimaryKey;
     toString += "\nId recepta: " + Recepta.PrimaryKey + " recepta";
     if (!FetAmbReceptaOriginal)
     {
         toString += " " + " NO ";
     }
     toString += " original";
     toString += "\nQuantitat: " + Quantitat;
     toString += "\nData Caducitat: " + DataCaducitat;
     toString += "\nData Que es va obrir: ";
     if (Obert)
     {
         toString += DataQueEsVaObrir;
     }
     return(toString);
 }
コード例 #5
0
ファイル: Producte.cs プロジェクト: OldNet/Gabriel.Cat.Estoc
 private void RedueixIDessa(string rutaImatge)
 {
     if (File.Exists(rutaImatge))
     {
         var img  = new System.Drawing.Bitmap(rutaImatge);
         var imgR = gabriel.cat.Imagen.Escala(img, Convert.ToDecimal((img.Height % 100) / 100.0));
         if (!Directory.Exists(Environment.CurrentDirectory + "\\imatges"))
         {
             Directory.CreateDirectory(Environment.CurrentDirectory + "\\imatges");
         }
         rutaImatge = "\\imatges\\" + PrimaryKey + ".png";
         imgR.Save(Environment.CurrentDirectory + rutaImatge, System.Drawing.Imaging.ImageFormat.Png);
         Gabriel.Cat.text rt = rutaImatge;
         rt.Replace('\\', ';');
         this.rutaImatge = rt;
     }
     else
     {
         rutaImatge = "";
     }
 }
コード例 #6
0
ファイル: Producte.cs プロジェクト: OldNet/Gabriel.Cat.Estoc
 public override string ToString()
 {
     Gabriel.Cat.text toString = "";
     toString += "\nId producte: " + PrimaryKey;
     toString += "\nTaula SQL: " + Taula;
     toString += "\nCategoria: " + Categoria;
     toString += "\nUnitat: " + Unitat;
     toString += "\nRuta Imatge: " + RutaImatge;
     toString += "\nInformació EXTRA: " + InfoExtra;
     toString += "\nRecepta: " + ReceptaOriginal.PrimaryKey;
     toString += "\nQuantitat minima en estoc: " + QuantitatMinimaEstoc;
     toString += "\nQuantitat normal en estoc: " + QuantitatNormalEstoc;
     toString += "\nTemps avis per caducar: " + TempsAvisPerCaducar;
     toString += "\nTemps un cop Obert: " + TempsUnCopObert;
     toString += "\nTemps un cop Fet: " + TempsUnCopFet;
     toString += "\nUnitats fetes amb la recepta original: " + UnitatsFetesAmbLaRecepteOriginal;
     toString += "\nQuantitat: " + QuantitatReceptaOriginal;
     toString += "\nUnitats no fetes amb la recepta original: " + UnitatsNoFetesAmbLaRecepteOriginal;
     toString += "\nQuantitat: " + QuantitatNoFetaAmbReceptaOriginal;
     toString += "\nUnitats Total: " + unitats.Count;
     toString += "\nQuantitat total: " + QuantitatTotal;
     return(toString);
 }