Beispiel #1
0
        private void save_transcation()
        {
            DBConnect connect = new DBConnect();
            string    str     = "Honda";
            string    str2    = this.comboBoxParty.SelectedItem.ToString();
            string    str3    = this.comboBoxPartsNo.SelectedItem.ToString();
            string    str4    = this.comboBoxDescip.SelectedItem.ToString();
            string    text    = this.textBoxPurchasePrice.Text;
            string    str6    = this.textBoxR.Text;
            string    str7    = this.dateTimePicker2.Value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);
            string    str8    = this.textBoxW.Text;
            string    str9    = this.textBoxD.Text;
            string    str10   = connect.SelectSingle("Select model from firoz_center.tbl_parts_info where partsNo='" + str3 + "' and `group` = '" + this.comboBoxParty.SelectedItem.ToString() + "' ;");
            string    str11   = connect.SelectSingle("Select partsId from firoz_center.tbl_parts_info where partsNo='" + str3 + "' and `group` = '" + this.comboBoxParty.SelectedItem.ToString() + "' ;");
            string    query   = "insert into firoz_center.tbl_parts_info (`partsId`,`brand`,`model`,`partsNo`,`description`,`purchase_price`,`sale_price`,`date`,`wholesale_price`,`distributor_price`,`group`) values ('" + str11 + "','" + str + "','" + str10 + "','" + str3 + "','" + str4 + "','" + text + "','" + str6 + "','" + str7 + "','" + str8 + "','" + str9 + "','" + str2 + "');";

            connect.Insert(query);
            this.textBoxPurchasePrice.Text  = "";
            this.textBoxRetailPrice.Text    = "";
            this.textBoxWholeSalePrice.Text = "";
            this.textBoxDealerPrice.Text    = "";
            this.textBoxD.Text = "";
            this.textBoxR.Text = "";
            this.textBoxW.Text = "";
            MessageBox.Show("Price Updated");
        }
Beispiel #2
0
        private void save_transcation()
        {
            DBConnect connect = new DBConnect();
            string    text    = this.textBoxName.Text;
            string    str2    = this.textBoxAddress.Text;
            string    str3    = this.textBoxContact.Text;
            string    str4    = this.textBoxPosition.Text;
            string    str5    = this.dateTimePicker1.Value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);
            string    str6    = this.textBoxSalary.Text;

            if ((((text.Equals("") || str2.Equals("")) || (str3.Equals("") || str4.Equals(""))) || str5.Equals("")) || str6.Equals(""))
            {
                MessageBox.Show("Check Data Again");
            }
            else
            {
                string query = "insert into firoz_center.tbl_employee (`name`,`address`,`contact`,`joinDate`,`position`,`salary`,`comments`,`status`) values ('" + text + "','" + str2 + "','" + str3 + "','" + str5 + "','" + str4 + "','" + str6 + "','','Active');";
                connect.Insert(query);
                this.textBoxName.Text     = "";
                this.textBoxContact.Text  = "";
                this.textBoxAddress.Text  = "";
                this.textBoxSalary.Text   = "";
                this.textBoxPosition.Text = "";
                MessageBox.Show("Data Inserted");
            }
        }
Beispiel #3
0
        private void save_transcation()
        {
            string str13;
            string text = this.textBoxGroup.Text;
            string str2 = "Honda";
            string str3 = this.textBoxModel.Text;
            string str4 = this.textBoxPartsNo.Text;
            string str5 = this.textBoxDescription.Text;
            string str6 = this.textBoxPurchasePrice.Text;
            string str7 = this.textBoxR.Text;

            DateTime now = new DateTime();

            now = DateTime.Now;
            //string str8 = string.Format("{0:yyyy-MM-dd}", now);
            string str8 = "2016-01-01";

            string    str9    = this.textBoxW.Text;
            string    str10   = this.textBoxD.Text;
            DBConnect connect = new DBConnect();
            string    query   = "SELECT partsId FROM firoz_center.tbl_parts_info where partsNo='" + this.textBoxPartsNo.Text + "';";
            string    str12   = connect.SelectSingle(query);

            if (connect.Count(query) == -1L)
            {
                str13 = "insert into firoz_center.tbl_parts_info (`brand`,`model`,`partsNo`,`description`,`purchase_price`,`sale_price`,`date`,`wholesale_price`,`distributor_price`,`group`) values ('" + str2 + "','" + str3 + "','" + str4 + "','" + str5 + "','" + str6 + "','" + str7 + "','" + str8 + "','" + str9 + "','" + str10 + "','" + text + "');";
                connect.Insert(str13);
            }
            else
            {
                str13 = "insert into firoz_center.tbl_parts_info (`partsid`,`brand`,`model`,`partsNo`,`description`,`purchase_price`,`sale_price`,`date`,`wholesale_price`,`distributor_price`,`group`) values ('" + str12 + "','" + str2 + "','" + str3 + "','" + str4 + "','" + str5 + "','" + str6 + "','" + str7 + "','" + str8 + "','" + str9 + "','" + str10 + "','" + text + "');";
                connect.Insert(str13);
            }
            this.textBoxGroup.Text         = "";
            this.textBoxModel.Text         = "";
            this.textBoxPartsNo.Text       = "";
            this.textBoxPurchasePrice.Text = "";
            this.textBoxSalesPrice.Text    = "";
            this.textBoxDescription.Text   = "";
            this.textBoxWholeSAle.Text     = "";
            this.textBoxDealer.Text        = "";
            this.textBoxD.Text             = "";
            this.textBoxR.Text             = "";
            this.textBoxW.Text             = "";
            MessageBox.Show("Data Inserted");
        }
Beispiel #4
0
        private void save_transcation()
        {
            DBConnect connect = new DBConnect();
            string    text    = this.textBoxName.Text;
            string    str2    = this.textBoxAddress.Text;
            string    str3    = this.textBoxContact.Text;
            string    str4    = this.textBoxAC.Text;
            string    str5    = this.textBoxBalance.Text;
            string    str6    = DateTime.Now.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);
            string    query   = "insert into firoz_center.tbl_bank_info (`name`,`description`,`address`,`branch`,`contact`,`ac_no`,`balance`) values ('" + text + "','','" + str2 + "','','" + str3 + "','" + str4 + "','" + str5 + "');";

            connect.Insert(query);
            string str8 = connect.SelectSingle("Select bank_id from firoz_center.tbl_bank_info where name='" + text + "' and ac_no='" + str4 + "';");

            query = "insert into firoz_center.tbl_bank_transcation (`bank_transcation_id`,`bank_id`,`date`,`amount`,`description`) values ('" + this.t_id + "','" + str8 + "','" + str6 + "','" + str5 + "','Initial Deposite');";
            connect.Insert(query);
            base.Dispose();
            MessageBox.Show("Data Inserted");
        }
Beispiel #5
0
        private void save_transcation()
        {
            DBConnect connect = new DBConnect();
            string    text    = this.textBoxName.Text;
            string    str2    = this.textBoxAddress.Text;
            string    str3    = this.textBoxContact.Text;
            string    str4    = this.textBoxEmail.Text;
            string    query   = "insert into firoz_center.tbl_party (`name`,`address`,`contact`,`e-mail`,`comments`) values ('" + text + "','" + str2 + "','" + str3 + "','" + str4 + "','');";

            connect.Insert(query);
            base.Dispose();
            MessageBox.Show("Data Inserted");
        }
Beispiel #6
0
        private void save_transcation()
        {
            DBConnect connect = new DBConnect();
            string    text    = this.textBoxName.Text;
            string    str2    = this.textBoxDescription.Text;
            string    str3    = this.textBoxCharge.Text;
            string    query   = "insert into firoz_center.tbl_service_charge (`name`,`description`,`charge`) values ('" + text + "','" + str2 + "','" + str3 + "');";

            connect.Insert(query);
            this.textBoxName.Text        = "";
            this.textBoxCharge.Text      = "";
            this.textBoxDescription.Text = "";
            MessageBox.Show("Data Inserted");
        }
        private void buttonSave_Click_1(object sender, EventArgs e)
        {
            DBConnect connect = new DBConnect();
            string    text    = this.textBoxName.Text;
            string    str2    = this.textBox1.Text;
            string    str3    = this.textBoxAddress.Text;
            string    str4    = this.textBoxContact.Text;
            string    str5    = this.textBoxEmail.Text;
            string    query   = "insert into firoz_center.tbl_customer (`name`,`fathers_name`,`address`,`contact`,`email`,`comments`) values ('" + text + "','" + str2 + "','" + str3 + "','" + str4 + "','" + str5 + "','');";

            connect.Insert(query);
            base.Dispose();
            MessageBox.Show("Data Inserted");
            new NewSalesMotorCycle().Show();
        }
Beispiel #8
0
        private void save_transcation()
        {
            string sid      = this.textBoxSID.Text;
            string sno      = this.textBoxSNO.Text;
            string memo_no  = this.textBoxMemoNo.Text;
            string mileage  = this.textBoxMileage.Text;
            string comments = "Default";

            DateTime now = new DateTime();

            now = DateTime.Now;
            string date = this.dateTimePicker1.Value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);

            string query = "insert into firoz_center.tbl_servicing (`servicing_id`,`date`,`memo_no`,`service_no`,`mileage`,`comments`) values ('" + sid + "','" + date + "','" + memo_no + "','" + sno + "','" + mileage + "','" + comments + "');";

            dbc.Insert(query);

            MessageBox.Show("Data Inserted");
        }