private void txtCash_TextChanged(object sender, EventArgs e) { try { txtLetterCash.Text = Num2Text.ToFarsi(Convert.ToInt64(txtCash.Text)) + " " + "ریال"; } catch { txtLetterCash.Text = "صفر ریال"; } }
private void txtEntity_TextChanged(object sender, EventArgs e) { try { clsFunction.Three_Ziro(txtEntity); txtLetter_Cash.Text = Num2Text.ToFarsi(Convert.ToInt64(txtEntity.Text)) + " " + "ریال"; } catch { txtLetter_Cash.Text = "صفر ریال"; } }
private void Set_Table_Name() { try { Table_Name = Num2Text.ToFarsi(Convert.ToInt64(txtChair.Text)); txtName.Text = "میز شماره ی " + txtCode.Text + " " + Table_Name + " " + "نفره"; } catch { txtName.Text = ""; } }
private void txtPrice_TextChanged(object sender, EventArgs e) { try { clsFunction.Three_Ziro(txtPrice); txtDigit.Text = Num2Text.ToFarsi(Convert.ToInt64(txtPrice.Text)) + " " + "ریال"; } catch { txtDigit.Text = "صفر ریال"; } }
private void btnFinish_Click(object sender, EventArgs e) { if (clsFunction.Error_Provider(txtChair, errorProvider1, "این فیلد نمی تواند خالی باشد") == true || txtCode.Value.ToString() == "" || txtCode1.Value.ToString() == "") { } else { errorProvider1.Clear(); if (op == "Add") { for (int i = Convert.ToInt32(txtCode.Value); i <= Convert.ToInt32(txtCode1.Value); i++) { try { Table_Name = "میز شماره ی " + i + " " + Num2Text.ToFarsi(Convert.ToInt64(txtChair.Text)) + " " + "نفره"; string query = "INSERT INTO tbl_Tables (Table_Code, Table_Name, Table_Chair, Table_State) VALUES ('" + i + "',N'" + Table_Name + "','" + Convert.ToInt32(txtChair.Text) + "',0)"; if (clsFunction.Execute(dataconnection, query) == true) { } } catch { } } this.Close(); } else if (op == "Edit") { for (int i = Convert.ToInt32(txtCode.Value); i <= Convert.ToInt32(txtCode1.Value); i++) { try { Table_Name = "میز شماره ی " + i + " " + Num2Text.ToFarsi(Convert.ToInt64(txtChair.Text)) + " " + "نفره"; string query = "UPDATE tbl_Tables SET Table_Name = N'" + Table_Name + "', Table_Chair = '" + Convert.ToInt32(txtChair.Text) + "' WHERE Table_Code ='" + i + "'"; if (clsFunction.Execute(dataconnection, query) == true) { } } catch { } } this.Close(); } } }