public OCA.Common.DataSets.Kartabl.MailBox GetDrafts(string Username) { try { dsmail.Clear(); dsmail = mailclass.GetDrafts(Username); return(dsmail); } catch (Exception ex) { throw new Exception(ex.Message); } }
public Boolean Check_PrimaryKeyDraft(string Draft_User, string Draft_Name) { sda = new SqlDataAdapter("select * from Tbl_Draft where Draft_User = '******' and Draft_Name = '" + Draft_Name.Replace("ی", "ي") + "'", conn); try { dsmail.Clear(); if (conn.State == ConnectionState.Closed) { conn.Open(); } sda.Fill(dsmail.Tbl_Draft); if (dsmail.Tbl_Draft.Rows.Count == 0) { return(false); } else { return(true); } } catch { throw new Exception("خطا در ارتباط با بانک اطلاعاتی!"); } finally { conn.Close(); } }