private void bt_view_Click(object sender, EventArgs e) { if (cflag != 1) { try { d.Ins_Up_Del("INSERT INTO `ip`(`date`, `no`, `name`, `age`, `sex`, `blood`,`relation`, `father`, `house`, `village`, `panchayath`, `ward`, `post`, `pin`, `phone`, `mobile`, `other`, `doctor`, `department`,`atype`,`room_bed`,`aother`) VALUES ('" + date1 + "', '" + op1 + "', '" + name1 + "','" + age1 + "','" + sex1 + "','" + blood1 + "', '" + relation1 + "', '" + father1 + "', '" + house1 + "', '" + village1 + "', '" + panchayath1 + "', '" + ward1 + "', '" + post1 + "', '" + pin1 + "', '" + phone1 + "', '" + mobile1 + "', '" + other1 + "', '" + doctor1 + "', '" + department1 + "', '" + atype1 + "', '" + room_bed1 + "', '" + aother1 + "')"); this.Close(); } catch (Exception ex) { MessageBox.Show("Error " + ex.Message); } } else { try { other1 = "Converted from OP No. " + opn1 + " at " + date1 + " , " + other1; d.Ins_Up_Del("INSERT INTO `ip`(`date`, `no`, `name`, `age`, `sex`, `blood`,`relation`, `father`, `house`, `village`, `panchayath`, `ward`, `post`, `pin`, `phone`, `mobile`, `other`, `doctor`, `department`,`atype`,`room_bed`,`aother`) VALUES ('" + date1 + "', '" + op1 + "', '" + name1 + "','" + age1 + "','" + sex1 + "','" + blood1 + "', '" + relation1 + "', '" + father1 + "', '" + house1 + "', '" + village1 + "', '" + panchayath1 + "', '" + ward1 + "', '" + post1 + "', '" + pin1 + "', '" + phone1 + "', '" + mobile1 + "', '" + other1 + "', '" + doctor1 + "', '" + department1 + "', '" + atype1 + "', '" + room_bed1 + "', '" + aother1 + "')"); // d.Ins_Up_Del("DELETE FROM `op` WHERE `no`='"+opn1+"'"); this.Close(); } catch (Exception ex) { MessageBox.Show("Error " + ex.Message); } } }
private void bt_submit_Click(object sender, EventArgs e) { try { d.Ins_Up_Del("INSERT INTO `op`(`date`, `no`, `name`, `age`, `sex`, `blood`,`relation`, `father`, `house`, `village`, `panchayath`, `ward`, `post`, `pin`, `phone`, `mobile`, `other`, `doctor`, `department`) VALUES ('" + date1 + "', '" + op1 + "', '" + name1 + "','" + age1 + "','" + sex1 + "','" + blood1 + "', '" + relation1 + "', '" + father1 + "', '" + house1 + "', '" + village1 + "', '" + panchayath1 + "', '" + ward1 + "', '" + post1 + "', '" + pin1 + "', '" + phone1 + "', '" + mobile1 + "', '" + other1 + "', '" + doctor1 + "', '" + department1 + "')"); this.Close(); } catch (Exception ex) { MessageBox.Show("Error " + ex.Message); } }