public static string getSign(string SignId) { try { SignatureBUS signBus = new SignatureBUS(); int id = int.Parse(SignId); DataTable tblSign = signBus.GetById(id); if (tblSign.Rows.Count > 0) { return tblSign.Rows[0]["SignatureContent"].ToString(); } return null; } catch (Exception) { throw; } }
protected void lbtInsertSignature_Click(object sender, EventArgs e) { InitialBUS(); try { int signId = int.Parse(((LinkButton)sender).CommandArgument.ToString()); SignatureBUS signBus = new SignatureBUS(); DataTable tblSign = signBus.GetById(signId); if (tblSign.Rows.Count > 0) { txtBody.Text = txtBody.Text + "\n" + tblSign.Rows[0]["SignatureContent"].ToString(); } } catch (Exception) { throw; } }
protected void lbtInsertSignature_Click(object sender, EventArgs e) { try { int signId = int.Parse(((LinkButton)sender).CommandArgument.ToString()); signBus = new SignatureBUS(); DataTable tblSign = signBus.GetById(signId); if (tblSign.Rows.Count > 0) { txtBody.Text = txtBody.Text + "\n" + tblSign.Rows[0]["SignatureContent"].ToString(); } } catch (Exception ex) { logs.Error(userLogin.Username + "-Create-Event - lbtInsertSignature_Click", ex); } }
protected void lbtEdit_Click(object sender, EventArgs e) { try { pnSuccess.Visible = false; pnError.Visible = false; int signId = int.Parse(((LinkButton)sender).CommandArgument.ToString()); signBus = new SignatureBUS(); DataTable dtSign = signBus.GetById(signId); if (dtSign.Rows.Count > 0) { txtSignatureName.Text = dtSign.Rows[0]["SignatureName"].ToString(); txtBody.Text = dtSign.Rows[0]["SignatureContent"].ToString(); hdfId.Value = dtSign.Rows[0]["id"].ToString(); } } catch (Exception) { throw; } }