public void SetMessages_MoneyTrans()
        {
            DataTable dt  = new DataTable();
            CCSBAL    bal = new CCSBAL();

            messagesObjs_moneyTrans = new List <MessageObject_MoneyTran>();
            dt = bal.CCS_GetTemp_MoneyTransactionForEmail_ForSending();

            foreach (DataRow dr in dt.Rows)
            {
                double      doubleTryParse;
                int         intTryParse;
                MailAddress to                     = new MailAddress(dr["Email"].ToString());
                MailMessage message_dep            = new MailMessage(from, to);
                EmailMonetyTrans_NotificationBO bo = new EmailMonetyTrans_NotificationBO();
                bo.Cust_Code         = dr["Cust_Code"].ToString();
                bo.Entry_Branch_Name = (dr["Branch_Name"].ToString() == Indication_BrokerBranch.HeadOffice) ? (dr["Branch_Name"].ToString()) : (dr["Branch_Name"].ToString() + " Branch");
                bo.VoucherNo         = dr["VoucherNo"].ToString();
                bo.ChequekBank       = dr["ChequekBank"].ToString();
                bo.ChequeBranch      = dr["ChequeBranch"].ToString();
                bo.Payment_Media_No  = dr["Payment_Media_No"].ToString();
                bo.Payment_Media     = dr["Payment_Media"].ToString();
                bo.Deposit_Withdraw  = dr["Deposit_Withdraw"].ToString();
                bo.TransReason       = dr["TransReason"].ToString();
                bo.CollectionBranch  = (dr["CollectionBranch"].ToString() == Indication_BrokerBranch.HeadOffice)?(dr["CollectionBranch"].ToString()):(dr["CollectionBranch"].ToString() + " Branch");
                bo.ReferenceNo       = Convert.ToInt32(dr["ReferenceNo"].ToString());
                double TransactionAmount = 0.00;
                if (double.TryParse(dr["Amount"].ToString(), out doubleTryParse))
                {
                    bo.Amount = doubleTryParse;
                }
                double CurrentBalance = 0.00;
                if (double.TryParse(dr["Money_Balance"].ToString(), out doubleTryParse))
                {
                    bo.Money_Balance = doubleTryParse;
                }

                if (bo.Deposit_Withdraw == "Deposit")
                {
                    message_dep = SetMoneyDepositInfoBody(message_dep, bo);
                    messagesObjs_moneyTrans.Add(new MessageObject_MoneyTran()
                    {
                        MessageInfoBo = bo, Mail = message_dep
                    });
                }
                else if (bo.Deposit_Withdraw == "Withdraw")
                {
                    message_dep = SetMoneyWithdrawInfoBody(message_dep, bo);
                    messagesObjs_moneyTrans.Add(new MessageObject_MoneyTran()
                    {
                        MessageInfoBo = bo, Mail = message_dep
                    });
                }
            }
        }
        private MailMessage SetMoneyWithdrawInfoBody(MailMessage message_dep, EmailMonetyTrans_NotificationBO bo)
        {
            string someArrows = new string(new char[] { '\u2190', '\u2191', '\u2192', '\u2193' });

            if (bo.Payment_Media == "Cash" && bo.Deposit_Withdraw == "Withdraw")
            {
                message_dep.Body = @"Dear sir or madam," + Environment.NewLine +
                                   @"As per request of you, We have Withdrawal Cash Tk." + bo.Amount.ToString("0.00") + " against the client ID: " + bo.Cust_Code + "  at " + bo.Entry_Branch_Name + ". Withdrawal Voucher number:" + bo.VoucherNo + " . End of day your account balance is Tk. " + bo.Money_Balance.ToString("0.00") + "" + Environment.NewLine + Environment.NewLine +
                                   @"Thanks a lot for your valuable transaction." + Environment.NewLine + Environment.NewLine +
                                   @"K-Securities & Consultants ltd." + Environment.NewLine + // someArrows +
                                                                                              //@"Member: # 122" + Environment.NewLine +
                                   @"www.ksclbd.com";

                // Include some non-ASCII characters in body and subject.
                message_dep.Body += Environment.NewLine;
                message_dep.Body += "This website's information are based on our actual record.  If any of the above details look incorrect, please advise immediately. This is however possible but highly unlikely to find your record inaccurate or missing. This may happened due to malfunction of any/some of web tools that we use to collect and display your data here such as internet connectivity, FTP software, web server malfunction,  problem with web database and others. We assure you that our master record of actual information is not affected by any of these.";
                message_dep.Body += Environment.NewLine;
            }
            else if (bo.Payment_Media == "EFT" && bo.Deposit_Withdraw == "Withdraw")
            {
                message_dep.Body = @"Dear sir or madam," + Environment.NewLine +
                                   @"As per request of you, We have Withdrawal EFT /Fund Transfer Tk. " + bo.Amount.ToString("0.00") + " against the client ID: " + bo.Cust_Code + " at " + bo.Entry_Branch_Name + ". Withdrawal Voucher number: " + bo.VoucherNo + ". End of day your account balance is Tk. " + bo.Money_Balance.ToString("0.00") + ". " +
                                   @"Your bank account will be settled after 2 working days from today." + Environment.NewLine + Environment.NewLine +
                                   @"Thanks a lot for your valuable transaction." + Environment.NewLine + Environment.NewLine +
                                   @"K-Securities & Consultants ltd." + Environment.NewLine + // someArrows +
                                                                                              //@"Member: # 122" + Environment.NewLine +
                                   @"www.ksclbd.com";

                // Include some non-ASCII characters in body and subject.
                message_dep.Body += Environment.NewLine;
                message_dep.Body += "This website's information are based on our actual record.  If any of the above details look incorrect, please advise immediately. This is however possible but highly unlikely to find your record inaccurate or missing. This may happened due to malfunction of any/some of web tools that we use to collect and display your data here such as internet connectivity, FTP software, web server malfunction,  problem with web database and others. We assure you that our master record of actual information is not affected by any of these.";
                message_dep.Body += Environment.NewLine;
            }
            else if (bo.Payment_Media == "Check" && bo.Deposit_Withdraw == "Withdraw")
            {
                message_dep.Body = @"Dear sir or madam," + Environment.NewLine +
                                   @"As per request of you, We have Withdrawal Cheque Tk. " + bo.Amount.ToString("0.00") + @" against the client ID: " + bo.Cust_Code + @". Your Collection Branch: " + bo.CollectionBranch + ". You will be able to collect your cheque after " + (bo.CollectionBranch == Indication_BrokerBranch.HeadOffice ? "2" : "4") + " working Days from today. End of day your account balance is Tk. " + bo.Money_Balance.ToString("0.00") + "" + Environment.NewLine + Environment.NewLine +
                                   @"Thanks a lot for your valuable transaction." + Environment.NewLine + Environment.NewLine +
                                   @"K-Securities & Consultants ltd." + Environment.NewLine + // someArrows +
                                                                                              //@"Member: # 122" + Environment.NewLine+
                                   @"www.ksclbd.com";

                // Include some non-ASCII characters in body and subject.
                message_dep.Body += Environment.NewLine;//+someArrows;
                message_dep.Body += "This website's information are based on our actual record.  If any of the above details look incorrect, please advise immediately. This is however possible but highly unlikely to find your record inaccurate or missing. This may happened due to malfunction of any/some of web tools that we use to collect and display your data here such as internet connectivity, FTP software, web server malfunction,  problem with web database and others. We assure you that our master record of actual information is not affected by any of these.";
                message_dep.Body += Environment.NewLine;
            }
            else if (bo.Payment_Media == Indication_PaymentTransaction.Cheque_Return && bo.Deposit_Withdraw == Indication_PaymentMode.Withdraw)
            {
                message_dep.Body = @"Dear sir or madam," + Environment.NewLine +
                                   @"We have Withdrawal Cheque Return Tk. " + bo.Amount.ToString("0.00") + " against the client ID: " + bo.Cust_Code + " at " + bo.Entry_Branch_Name + ". Your return cheque is ‘" + bo.ChequekBank + ", " + bo.ChequeBranch + ", cheque No: " + bo.Payment_Media_No + "’, Withdrawal Voucher number: " + bo.VoucherNo + ". End of day your account balance is Tk. " + bo.Money_Balance.ToString("0.00") + "" + Environment.NewLine + Environment.NewLine +
                                   @"Thanks a lot for your valuable transaction." + Environment.NewLine + Environment.NewLine +
                                   @"K-Securities & Consultants ltd." + Environment.NewLine +
                                   //@"Member: # 122" + Environment.NewLine +
                                   @"www.ksclbd.com";

                // Include some non-ASCII characters in body and subject.
                message_dep.Body += Environment.NewLine;
                message_dep.Body += "This website's information are based on our actual record.  If any of the above details look incorrect, please advise immediately. This is however possible but highly unlikely to find your record inaccurate or missing. This may happened due to malfunction of any/some of web tools that we use to collect and display your data here such as internet connectivity, FTP software, web server malfunction,  problem with web database and others. We assure you that our master record of actual information is not affected by any of these.";
                message_dep.Body += Environment.NewLine;
            }
            else if (bo.Payment_Media.Contains(Indication_PaymentTransaction.Return_Indicator) && bo.Deposit_Withdraw == "Withdraw")
            {
                message_dep.Body = @"Dear sir or madam," + Environment.NewLine +
                                   @"As per request of you, We have Withdrawal " + bo.Payment_Media.Replace(Indication_PaymentTransaction.Return_Indicator, "") + " " + Indication_PaymentTransaction.Return_Indicator + " Tk." + bo.Amount.ToString("0.00") + " against the client ID: " + bo.Cust_Code + "  at " + bo.Entry_Branch_Name + ". Withdrawal Voucher number:" + bo.VoucherNo + " . End of day your account balance is Tk. " + bo.Money_Balance.ToString("0.00") + "" + Environment.NewLine + Environment.NewLine +
                                   @"Thanks a lot for your valuable transaction." + Environment.NewLine + Environment.NewLine +
                                   @"K-Securities & Consultants ltd." + Environment.NewLine + // someArrows +
                                                                                              //@"Member: # 122" + Environment.NewLine +
                                   @"www.ksclbd.com";

                // Include some non-ASCII characters in body and subject.
                message_dep.Body += Environment.NewLine;
                message_dep.Body += "This website's information are based on our actual record.  If any of the above details look incorrect, please advise immediately. This is however possible but highly unlikely to find your record inaccurate or missing. This may happened due to malfunction of any/some of web tools that we use to collect and display your data here such as internet connectivity, FTP software, web server malfunction,  problem with web database and others. We assure you that our master record of actual information is not affected by any of these.";
                message_dep.Body += Environment.NewLine;
            }
            //if (bo.Payment_Media == "TR" && bo.Deposit_Withdraw == "Withdraw")
            //{
            //    message_dep.Body = @"Dear sir or madam," + Environment.NewLine +
            //    @"As per request of you, We have Withdrawal Cash Transfer  Tk." + bo.Amount + " (Client ID : " + bo.TransReason + ") against the client ID: " + bo.Cust_Code + "  at " + bo.Entry_Branch_Name + ". Withdrawal Voucher number:" + bo.VoucherNo + " . End of day your account balance is Tk. " + bo.Money_Balance + "" + Environment.NewLine + Environment.NewLine +
            //    @"Thanks a lot for your valuable transaction." + Environment.NewLine + Environment.NewLine +
            //    @"K-Securities & Consultants ltd." + Environment.NewLine +// someArrows +
            //    @"Member: # 122" + Environment.NewLine +
            //    @"www.ksclbd.com";

            //    // Include some non-ASCII characters in body and subject.
            //    message_dep.Body += Environment.NewLine;
            //}

            message_dep.BodyEncoding    = System.Text.Encoding.UTF8;
            message_dep.Subject         = "Money Withdraw Notification";
            message_dep.SubjectEncoding = System.Text.Encoding.UTF8;

            return(message_dep);
        }