Ejemplo n.º 1
0
 internal _InterimDividend FetchInerimDividendByWOID(_InterimDividend objGetDetails, SafeDataReader dr)
 {
     objGetDetails.ID = dr.GetInt32("ID");
     objGetDetails.WOID = dr.GetInt32("WOID");
     objGetDetails.FinancialPeriod = dr.GetString("FinancialPeriod");
     objGetDetails.ClassOfShare = dr.GetInt32("ClassOfShare");
     objGetDetails.DividendPerShare = dr.GetString("DividendPerShare");
     objGetDetails.Currency = dr.GetInt32("Currency");
     objGetDetails.TotalAmount = dr.GetString("TotalAmount");
     objGetDetails.DateOfDeclaration = dr.GetString("DateOfDeclaration");
     objGetDetails.DateOfPayment = dr.GetString("DateOfPayment");
     objGetDetails.DividendDirector = dr.GetInt32("DividendDirector");
     objGetDetails.DividendSource = dr.GetString("DividendSource");
     objGetDetails.IsDividend = dr.GetBoolean("IsDividend");
     objGetDetails.TotalShares = dr.GetString("TotalNoOfShares");
     return objGetDetails;
 }
Ejemplo n.º 2
0
        public JsonResult SaveWoInterimDividendDetails(int WOID, string FinancialPeriod, string DateOfDeclaration, string DateOfPayment, int DividendDirector, string DividendSource)
        {
            System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame();
            System.Reflection.MethodBase methodBase = stackFrame.GetMethod();
            log.Debug("Start: " + methodBase.Name);
            try
            {
                int checkSession = UserLogin.AuthenticateRequest();
                if (checkSession == 0)
                {
                    return Json(checkSession);
                }
                else
                {
                    int createdBy = Convert.ToInt32(Session["UserID"]);
                    var objInterimDividend = new _InterimDividend()
                    {
                        WOID = WOID,
                        FinancialPeriod = FinancialPeriod,
                        //ClassOfShare = ClassOfShare,
                        DateOfDeclaration = DateOfDeclaration,
                        DateOfPayment = DateOfPayment,
                        DividendDirector = DividendDirector,
                        DividendSource = DividendSource,
                        SavedBy = createdBy,
                    };

                    checkSession = objInterimDividend.SaveWoInterimDividendDetails();
                    return Json(checkSession);
                }
            }
            catch (Exception ex)
            {
                log.Error("Error: " + ex);
                return Json("");
            }
            finally
            {
                log.Debug("End: " + methodBase.Name);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Description  : To Get All WOInterimDividend Details by WOID.
        /// Created By   : Shiva  
        /// Created Date : 22 Aug 2014
        /// Modified By  :
        /// Modified Date:
        /// </summary>
        /// <returns>WOInterimDividend details.</returns>
        public static _InterimDividend GetWOInerimDividendDetailsByWOID(int WOID)
        {
            var WOInterimDividendData = new _InterimDividend();

            System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame();
            System.Reflection.MethodBase methodBase = stackFrame.GetMethod();
            log.Debug("Start: " + methodBase.Name);
            try
            {
                SqlParameter[] sqlParams = new SqlParameter[1];
                sqlParams[0] = new SqlParameter("@WOID", WOID);
                var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SPGetWOInterimDividendDetailsByWOID", sqlParams);
                var safe = new SafeDataReader(reader);
                while (reader.Read())
                {
                    WOInterimDividendData.FetchInerimDividendByWOID(WOInterimDividendData, safe);
                }

                return WOInterimDividendData;
            }
            catch (Exception ex)
            {
                log.Error("Error: " + ex);
                return WOInterimDividendData;
            }
            finally
            {
                log.Debug("End: " + methodBase.Name);
            }
        }