private void MListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e) { Android.App.AlertDialog.Builder alert = new Android.App.AlertDialog.Builder(this); List <KhatawaniTapshilNaveJama> ResultNew; try { var db = new SQLiteConnection(filename); GirviNO = Result.ElementAt(e.Position); String str = GirviNO.receipt_no.ToString(); var data = db.Query <KhatawaniTapshilNaveJama>("SELECT CM.khatawani_No, GM.GirviRecordNo, GIM.metal_type, GIM.item_type, GIM.Total_Quantity, GIM.gross_wt, GIM.net_wt, GIM.fine_wt, GM.Amount, GM.Date_of_deposit, GM.forwardstatus, GM.Forwarded_to, GM.Date_of_Forward, GM.forwardamount, CM.FullName, CM.Contact_No, CM.Address,GM.Status FROM customer_master AS CM INNER JOIN GirviMaster AS GM ON CM.khatawani_No = GM.khatawani_No INNER JOIN GirviItemMaster AS GIM ON GM.GirviRecordNo = GIM.GirviNo where GM.Status = 'unchange' and GM.receipt_no = '" + str + "'").ToList(); ResultNew = data; item = ResultNew.ElementAt(0); } catch { } Message = (item.metal_type + " " + item.item_type + " (" + item.Total_Quantity + "nos.) " + "\n" + "ग्रॉस वेट : " + item.gross_wt + " gm " + "\n" + "नेट वेट : " + item.net_wt + " gm " + "\n" + "फाईन वेट : " + item.fine_wt + " gm ") == null ? "" : (item.metal_type + " " + item.item_type + " (" + item.Total_Quantity + "nos.) " + "\n" + "ग्रॉस वेट : " + item.gross_wt + " gm " + "\n" + "नेट वेट : " + item.net_wt + " gm " + "\n" + "फाईन वेट : " + item.fine_wt + " gm ").ToString(); if (item.forwardstatus == "Forward") { ForworDetails = ("Forward To : " + item.Forwarded_to + "\n" + "Forward Date : " + item.Date_of_Forward + "\n" + "Forward Amount : " + item.forwardamount) == null ? "" : ("Forward To : " + item.Forwarded_to + "\n" + "Forward Date : " + item.Date_of_Forward + "\n" + "Forward Amount : " + item.forwardamount).ToString(); FullMessage = Message + "\n" + "\n" + "\n" + "\n" + "***Girvi Forward Details***" + "\n" + "\n" + ForworDetails; } else { FullMessage = Message; } alert.SetTitle(Html.FromHtml("<font color='#EC407A'>गिरवी डीटेल्स</font>")); alert.SetMessage(FullMessage); alert.SetPositiveButton("OK", (senderAlert, args) => { return; }); Dialog dialog = alert.Create(); dialog.Show(); }
private void MListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e) { List <KhatawaniTapshilNaveJama> ResultNew; try { var db = new SQLiteConnection(dbPath); GirviNO = Result.ElementAt(e.Position); string strGirviNO = GirviNO.receipt_no.ToString(); var data = db.Query <KhatawaniTapshilNaveJama>("SELECT CM.khatawani_No, GM.GirviRecordNo, GIM.metal_type, GIM.item_type, GIM.Total_Quantity, GIM.gross_wt, GIM.net_wt, GIM.fine_wt, GM.Amount, GM.Date_of_deposit, CM.FullName, CM.Contact_No, CM.Address,GM.Status FROM customer_master AS CM INNER JOIN GirviMaster AS GM ON CM.khatawani_No = GM.khatawani_No INNER JOIN GirviItemMaster AS GIM ON GM.GirviRecordNo = GIM.GirviNo where GM.receipt_no = '" + strGirviNO.Trim() + "'").ToList(); ResultNew = data; item = ResultNew.ElementAt(0); try { Tday = DateTime.Now.ToString("dd/MM/yyyy"); if (GirviNO.Date_of_deposit.ToString() != "" && Tday != "") { if (GirviNO.Status.ToString().Trim() == "Release") { EkunDiwas = (((Convert.ToDateTime(GirviNO.withdraw_release_date.ToString()) - Convert.ToDateTime(GirviNO.Date_of_deposit.ToString())).TotalDays) + _ObjSettingMobileAppModel.CalculationDaysDifference).ToString(); } else { EkunDiwas = (((Convert.ToDateTime(Tday) - Convert.ToDateTime(GirviNO.Date_of_deposit.ToString())).TotalDays) + _ObjSettingMobileAppModel.CalculationDaysDifference).ToString(); } } } catch { } Interset = InterestAmount(GirviNO.Amount.ToString(), GirviNO.interset_rate.ToString(), EkunDiwas).ToString(); TotalAmount = (Convert.ToDouble(Interset) + Convert.ToDouble(GirviNO.Amount.ToString())).ToString(); Message = (item.metal_type + " " + item.item_type + " (" + item.Total_Quantity + "nos.) " + "\n" + "ग्रॉस वेट : " + item.gross_wt + " gm " + "\n" + "नेट वेट : " + item.net_wt + " gm " + "\n" + "फाईन वेट : " + item.fine_wt + " gm ") == null ? "" : (item.metal_type + " " + item.item_type + " (" + item.Total_Quantity + "nos.) " + "\n" + "ग्रॉस वेट : " + item.gross_wt + " gm " + "\n" + "नेट वेट : " + item.net_wt + " gm " + "\n" + "फाईन वेट : " + item.fine_wt + " gm ").ToString(); Calculation = ("गिरवी रक्कम : " + GirviNO.Amount.ToString() + "\n" + "व्याज टक्के : " + GirviNO.interset_rate.ToString() + "\n" + "एकूण दिवस : " + EkunDiwas + "\n" + "व्याज रक्कम : " + Interset + "\n" + "एकूण भरावयाची रक्कम : " + TotalAmount).ToString(); MessageFull = Message + "\n" + "\n" + "\n" + "\n" + Calculation; } catch { } Android.App.AlertDialog.Builder alert = new Android.App.AlertDialog.Builder(this); if (GirviNO.Status.ToString().Trim() == "Release") { alert.SetTitle(Html.FromHtml("<font color='#EC407A'>गिरवी रीलीज डीटेल्स</font>")); } else { alert.SetTitle(Html.FromHtml("<font color='#EC407A'>गिरवी डीटेल्स</font>")); } // alert.SetTitle("Confirm Start Audit"); alert.SetMessage(MessageFull); alert.SetPositiveButton("OK", (senderAlert, args) => { return; }); Dialog dialog = alert.Create(); dialog.Show(); }