Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        public void Call(int Position)
        {
            ContactNo = Result.ElementAt(Position);

            String sContactNo = ContactNo.Contact_No.ToString();

            try
            {
                if (sContactNo != null)
                {
                    if (sContactNo != "")
                    {
                        Double isContactNo = Convert.ToDouble(sContactNo);
                        if (isContactNo > 9)
                        {
                            string telphone = sContactNo.Trim();
                            Intent phone    = new Intent(Intent.ActionCall, Android.Net.Uri.Parse(string.Format("tel:{0}", telphone)));
                            StartActivity(phone);
                        }

                        else
                        {
                            myVib.Vibrate(100);
                            Toast.MakeText(this, "मोबाईल नंबर चुकीचा आहे.", ToastLength.Short).Show();
                            return;
                        }
                    }

                    else
                    {
                        myVib.Vibrate(100);
                        Toast.MakeText(this, "मोबाईल नंबर उपलब्ध नाही.", ToastLength.Short).Show();
                        return;
                    }
                }

                else
                {
                    myVib.Vibrate(100);
                    Toast.MakeText(this, "मोबाईल नंबर उपलब्ध नाही.", ToastLength.Short).Show();
                    return;
                }
            }

            catch { }
        }