private void dueListToolStripMenuItem_Click(object sender, EventArgs e) { DueList go = new DueList(); go.MdiParent = this; go.Show(); }
private void button3_Click(object sender, EventArgs e) { DueList go = new DueList(); go.MdiParent = this.ParentForm; go.Show(); }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { this.Hide(); DueList go = new DueList(); go.MdiParent = this.ParentForm; go.Show(); }
private void btnSave_Click(object sender, EventArgs e) { if (txtReceive.Text == "") { // MessageBox.Show("You are Not able to Update"); MessageBox.Show("You are Not able to Update", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { try { if (Convert.ToDouble(txtReceive.Text) <= Convert.ToDouble(lbDueAmount.Text)) { double Receiveamt = Convert.ToDouble(lbDueAmount.Text) - Convert.ToDouble(txtReceive.Text); string sql = "UPDATE sales_payment set due_amount = '" + Receiveamt + "' where (sales_id = '" + lbsalesid.Text + "')"; DataAccess.ExecuteSQL(sql); //Insert Due payment history double remainingdeu = Convert.ToDouble(lbDueAmount.Text) - Convert.ToDouble(txtReceive.Text); string sqlreceivedue = " insert into tbl_duepayment (receivedate, sales_id, totalamt , dueamt, receiveamt , custid) " + " values ('" + dtReceiveDate.Text + "' , '" + lbsalesid.Text + "', '" + lbtotalamt.Text + "', " + " '" + remainingdeu + "', '" + txtReceive.Text + "', '" + lbcontact.Text + "') "; DataAccess.ExecuteSQL(sqlreceivedue); MessageBox.Show("Successfully Data Updated!", "Successful", MessageBoxButtons.OK, MessageBoxIcon.Information); txtReceive.Text = string.Empty; // this.Close(); this.Hide(); DueList go = new DueList(); go.MdiParent = this.ParentForm; go.Show(); } else { MessageBox.Show("You are Not able to Update \n\n Excced Due amount ", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch { } } }