private void btn_next_Click(object sender, EventArgs e) { if (txt_lenses.Text == "0" || txt_eyeWear.Text == "0" || txt_advance.Text == "0" || txt_total.Text == "0" || txt_balance.Text == "0" || txt_discount.Text == "0") { MSG.ERROR(this, "Fields can not be empty..."); } else { NewSpectaclesInvoice.FillFormOne(txt_order.Text, txt_orderdate.Value.ToString("yyyy-MM-dd"), txt_duedate.Value.ToString("yyyy-MM-dd"), double.Parse(txt_eyeWear.Text), double.Parse(txt_lenses.Text), double.Parse(txt_total.Text), cmb_pay_method.Text, cmb_pay_plan.Text, cmb_testedby.Text, double.Parse(txt_advance.Text), double.Parse(txt_discount.Text), double.Parse(txt_balance.Text), cmb_orderStatus.Text, lbl_receiptNo.Text); new frm_specs2().Show(); } }
private void btn_save_Click(object sender, EventArgs e) { try { if (txt_dist_sph_right.Text == "" || txt_dist_cyl_right.Text == "" || txt_dist_axis_right.Text == "" || txt_dist_sph_left.Text == "" || txt_dist_cyl_left.Text == "" || txt_dist_axis_left.Text == "" || txt_add_sph_right.Text == "" || txt_add_cyl_right.Text == "" || txt_add_axis_right.Text == "" || txt_add_sph_left.Text == "" || txt_add_cyl_left.Text == "" || txt_add_axis_left.Text == "" || txt_lense_type.Text == "" || txt_PD.Text == "" || txt_seg_height.Text == "" || txt_specialInc.Text == "" || txt_remarks.Text == "") { MSG.ERROR(this, "Fields can no be empty.If you want to leave a empty field please put (-) into text fields"); } else { NewSpectaclesInvoice.FillFormTwo(txt_dist_sph_right.Text, txt_dist_cyl_right.Text, txt_dist_axis_right.Text, txt_dist_sph_left.Text, txt_dist_cyl_left.Text, txt_dist_axis_left.Text, txt_add_sph_right.Text, txt_add_cyl_right.Text, txt_add_axis_right.Text, txt_add_sph_left.Text, txt_add_cyl_left.Text, txt_add_axis_left.Text, txt_lense_type.Text, cmb_frame.Text, txt_PD.Text, txt_seg_height.Text, txt_specialInc.Text, txt_remarks.Text); NewSpectaclesInvoice.save(this); new frm_orderComplete(Customer.id, NewSpectaclesInvoice.OrderNumber, "SPEC").Show(); } } catch (Exception) { MSG.ERROR(this, "Can not Save Please try again..."); } }