private void smsbtn_Click(object sender, EventArgs e)
        {
            dialogcontainer dg  = new dialogcontainer();
            sendsms         sms = new sendsms(contxt.Text, booknametxt.Text, nametxt.Text);

            sms.TopLevel = false;
            dg.dialogpnl.Controls.Add(sms);
            dg.lbl.Text         = "Send SMS";
            dg.Text             = "Send SMS";
            dg.Size             = new Size(600, 600);
            sms.numbertxt.Font  = new Font("MS Sans Serif", 9, FontStyle.Regular);
            sms.smsnpnl.Visible = false;
            sms.txtpnl.Location = new Point(35, 10);
            dg.Show();
            sms.Show();
        }
        private void smsbtn_Click(object sender, EventArgs e)
        {
            dialogcontainer dg  = new dialogcontainer();
            sendsms         sms = new sendsms(contactlbl, "", name);

            sms.TopLevel = false;
            dg.dialogpnl.Controls.Add(sms);
            dg.lbl.Text         = "Send SMS";
            dg.Text             = "Send SMS";
            dg.Size             = new Size(600, 600);
            sms.numbertxt.Font  = new Font("MS Sans Serif", 9, FontStyle.Regular);
            sms.smstxt.Text     = "Dear " + name + ", We would love to hear from you regarding your recent purchase and our services. Please click on the following link and leave your feedback on our Appstores. https://bit.ly/GetLalchowk or our social media handles.";
            sms.smsnpnl.Visible = false;
            sms.txtpnl.Location = new Point(35, 10);
            dg.Show();
            sms.Show();
        }
Exemple #3
0
        private void smsbtn_Click(object sender, EventArgs e)
        {
            dialogcontainer dg  = new dialogcontainer();
            sendsms         sms = new sendsms(contxt.Text, "", "");

            sms.TopLevel = false;
            dg.dialogpnl.Controls.Add(sms);
            dg.lbl.Text         = "Send SMS";
            dg.Text             = "Send SMS";
            dg.Size             = new Size(600, 600);
            sms.numbertxt.Font  = new Font("MS Sans Serif", 9, FontStyle.Regular);
            sms.smsnpnl.Visible = false;
            sms.txtpnl.Location = new Point(35, 10);
            sms.smstxt.Text     = "Thank you for contacting Lalchowk. Here is the procedure to sell books with us:\r\n1.Drop your books at our office i.e ( Hotel Bombay Gujrat, Palladium Lane - Lalchowk).\r\n2.Quality and condition check would be done on the book(s) and a new suitable price would be set for the book(s).\r\n3.After setting the price, we will charge flat 40% from the new fixed amount.\r\n4.Once the book(s) are sold, you will get a notification regarding the purchase and the said amount would be transferred through a preferable mode.\r\n5.Delivery process will be covered by our team.\r\nFor further queries please contact on 9906523492";
            dg.Show();
            sms.Show();
            try
            {
                Cursor = Cursors.WaitCursor;
                BackgroundWorker bg = new BackgroundWorker();
                bg.DoWork += (o, a) =>
                {
                    string cmd = "update sellbookrequests set sms_sent='1' where id='" + id + "'";
                    obj.nonQuery(cmd);
                    con.Close();

                    readreqs();
                };
                bg.RunWorkerCompleted += (o, b) =>
                {
                    selldataview.DataSource = bsource;
                    Cursor = Cursors.Arrow;
                };
                bg.RunWorkerAsync();
            }
            catch { Cursor = Cursors.Arrow; }
        }
        private void billaddbtn_Click(object sender, EventArgs e)
        {
            if (!Regex.IsMatch(dtxt.Text, @"^([0-9-]+)$") && dtxt.Text != "" || dtxt.Text == string.Empty)
            {
                MessageBox.Show("Please enter date in the following format DD-MM-YYYY");
            }
            else
            {
                try
                {
                    Cursor = Cursors.WaitCursor;
                    string date = Convert.ToDateTime(dtxt.Text).ToString("yyyy-MM-dd HH:mm:ss tt");
                    cmd = "update orders set status='Delivered', deliverdate='" + date + "', in_transit='0' where orderid='" + otxt.Text + "'";
                    obj.nonQuery(cmd);
                    obj.closeConnection();

                    aconn.Open();
                    mysqlcmd = new MySqlCommand("insert into billing(`orderid`, `user`, `amount`,`deliverydate`,`billno`) values ('" + otxt.Text + "','" + utxt.Text + "','" + atxt.Text + "','" + dtxt.Text + "','bill" + btxt.Text + "')", aconn);
                    mysqlcmd.ExecuteNonQuery();
                    mysqlcmd = new MySqlCommand("insert into deliveries(`orderid`, `email`, `amount`,`status`,`date`,`contact`,`shipping`) values ('" + otxt.Text + "','" + utxt.Text + "','" + atxt.Text + "','Delivered','" + dtxt.Text + "','" + contacttxt.Text + "','" + shiptxt.Text + "')", aconn);
                    mysqlcmd.ExecuteNonQuery();
                    aconn.Close();

                    MessageBox.Show("Bill added.");
                }
                catch (Exception ex)
                {
                    aconn.Close();
                    MessageBox.Show("Something happened, please try again.\n\n" + ex.Message.ToString(), "Error!");
                }

                DialogResult dgr = MessageBox.Show("Do you want to send feedback SMS?", "Confirm", MessageBoxButtons.YesNo);
                {
                    if (dgr == DialogResult.Yes)
                    {
                        dialogcontainer dg  = new dialogcontainer();
                        sendsms         sms = new sendsms(contacttxt.Text, "", "");
                        sms.TopLevel = false;
                        dg.dialogpnl.Controls.Add(sms);
                        dg.lbl.Text         = "Send SMS";
                        dg.Text             = "Send SMS";
                        dg.Size             = new Size(600, 600);
                        sms.numbertxt.Font  = new Font("MS Sans Serif", 9, FontStyle.Regular);
                        sms.smstxt.Text     = "Dear " + cname + ", We would love to hear from you regarding your recent purchase and our services. Please click on the following link and leave your feedback. https://bit.ly/GetLalchowk";
                        sms.smsnpnl.Visible = false;
                        sms.txtpnl.Location = new Point(35, 10);
                        dg.Show();
                        sms.Show();


                        //dialogcontainer dg = new dialogcontainer();
                        //promomail pm = new promomail(utxt.Text, dg);
                        //pm.TopLevel = false;
                        //dg.Size = new Size(700, 715);
                        //pm.epnl.Location = new Point(-300, 1);
                        //pm.attachtxt.Visible = true;
                        //pm.elistlbl.Text = "";
                        //pm.checkattach.Checked = true;
                        //dg.dialogpnl.Controls.Add(pm);
                        //pm.loadingdg();
                        //dg.Text = "Send Email";

                        //dg.Show();

                        //pm.Show();
                    }
                    else
                    {
                        Close();
                    }
                }
                Cursor = Cursors.Arrow;
                Close();
            }
        }