public int KrijoCmimiDhoma(int idDhoma) { int p = 0; int c = 1; int cd = 2; DbController db = new DbController(); p = this.KntAplikuarCmimiDhomaData(idDhoma); if (p == 0) { c = db.Create("dbKrijoCmimPerDhome", dtFillimi, dtMbarimi, cmimiDhoma); if (c == 0) { Inicializimi iniObject = new Inicializimi(); int i = iniObject.Inicializo(); int idCmimi = iniObject.idCmimi; cd = db.Create("dbKrijoCmimiDhoma", idDhoma, idCmimi); p = cd; } else { p = c; } } else { return(p); } return(p); }
public int KrijoRezervimKlienti() { int b = 0; DbController db = new DbController(); Inicializimi iniObject = new Inicializimi(); DataSet ds = db.Read("dbKrijoRezervimKlienti", this.emri, this.mbiemri, this.kapari, this.dtFillimi, this.dtMbarimi, this.dtRezervimi, this.emaili); if (b == 0) { //int i = iniObject.Inicializo(); //idRezervimi = iniObject.idRezervimi ; idRezervimi = Convert.ToInt32(ds.Tables[0].Rows[0][0]); b = b + db.Create("dbKrijoRezervimDhoma", idRezervimi, this.idDhomaKlienti); } return(b); }