protected void TxtQty_TextChanged(object sender, EventArgs e) { try { TxtQty.Text = TxtQty.Text == "" ? "0" : TxtQty.Text; TxtPurchaseRate.Text = TxtPurchaseRate.Text == "" ? "0" : TxtPurchaseRate.Text; LblTotal.Text = (Convert.ToDecimal(TxtQty.Text) * Convert.ToDecimal(Convert.ToDecimal(TxtPurchaseRate.Text) - Convert.ToDecimal(TxtDisRsChild.Text == "" ? "0" : TxtDisRsChild.Text))).ToString("0.00"); ImgBtnAdd.Focus(); } catch (Exception ex) { } }
protected void TxtQty_TextChanged(object sender, EventArgs e) { try { TxtSaleRate.Text = TxtSaleRate.Text == "" ? "0" : TxtSaleRate.Text; TxtQty.Text = TxtQty.Text == "" ? "0" : TxtQty.Text; LblTotal.Text = (Convert.ToDouble(TxtSaleRate.Text) * Convert.ToDouble(TxtQty.Text)).ToString("0.00"); ImgBtnAdd.Focus(); } catch (Exception ex) { } }