Exemplo n.º 1
0
 public JsonResult SaveWOEGMDetails(WOEGMAcquisitionDisposal EGMData)
 {
     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
         {
             var objEGMData = new WOEGMAcquisitionDisposal()
             {
                 MeetingNotice = EGMData.MeetingNotice,
                 MeetingNoticeSource = EGMData.MeetingNoticeSource,
                 MeetingMinutes = EGMData.MeetingMinutes,
                 MeetingMinutesSource = EGMData.MeetingMinutesSource,
                 OthersMeetingMinutes = EGMData.OthersMeetingMinutes,
                 Designation = EGMData.Designation,
                 ShareHoldingStructure = EGMData.ShareHoldingStructure,
                 ConsiderationCurrency = EGMData.ConsiderationCurrency,
                 ConsiderationAmount = EGMData.ConsiderationAmount,
                 NameVendor = EGMData.NameVendor,
                 IsROPlaceOfMeeting = EGMData.IsROPlaceOfMeeting,
                 MeetingAddressLine1 = EGMData.MeetingAddressLine1,
                 MeetingAddressLine2 = EGMData.MeetingAddressLine2,
                 MeetingAddressLine3 = EGMData.MeetingAddressLine3,
                 MeetingAddressCountry = EGMData.MeetingAddressCountry,
                 MeetingAddressPostalCode = EGMData.MeetingAddressPostalCode,
                 PropertyAddressLine1 = EGMData.PropertyAddressLine1,
                 PropertyAddressLine2 = EGMData.PropertyAddressLine2,
                 PropertyAddressLine3 = EGMData.PropertyAddressLine3,
                 PropertyAddressCountry = EGMData.PropertyAddressCountry,
                 PropertyAddressPostalCode = EGMData.PropertyAddressPostalCode,
                 SavedBy = checkSession,
                 WOID = EGMData.WOID,
                 TypeOfTransaction = EGMData.TypeOfTransaction
             };
             checkSession = objEGMData.SaveWOEGMDetails();
             return Json(checkSession);
         }
     }
     catch (Exception ex)
     {
         log.Error("Error: " + ex);
         return Json("");
     }
     finally
     {
         log.Debug("End: " + methodBase.Name);
     }
 }
        private WOEGMAcquisitionDisposal FetchCompanyDetailsByWOID(WOEGMAcquisitionDisposal GetDetails, SafeDataReader dr, bool IsFMGAddress)
        {
            if (IsFMGAddress)
            {
                string[] str = dr.GetString("AddressLine1").Split(';');
                GetDetails.MeetingAddressLine1 = str[0];
                GetDetails.MeetingAddressLine2 = str[1];
                GetDetails.MeetingAddressLine3 = str[2];
                GetDetails.MeetingAddressPostalCode = str[3];
            }
            else
            {
                GetDetails.MeetingAddressLine1 = dr.GetString("AddressLine1");
                GetDetails.MeetingAddressLine2 = dr.GetString("AddressLine2");
                GetDetails.MeetingAddressLine3 = dr.GetString("AddressLine3");
                GetDetails.MeetingAddressPostalCode = dr.GetString("AddressPostalCode");
            }
            GetDetails.MeetingAddressCountry = dr.GetInt32("countryid");
            GetDetails.MeetingAddressCountryName = dr.GetString("AddressCountry");

            return GetDetails;
        }
 private WOEGMAcquisitionDisposal FetchEGMByWOID(WOEGMAcquisitionDisposal GetDetails, SafeDataReader dr)
 {
     GetDetails.WOID = dr.GetInt32("WOID");
     GetDetails.MeetingNotice = dr.GetString("MeetingNotice");
     GetDetails.MeetingNoticeSource = dr.GetString("MeetingNoticeSource");
     GetDetails.MeetingMinutes = dr.GetString("MeetingMinutes");
     GetDetails.MeetingMinutesSource = dr.GetString("MeetingMinutesSource");
     GetDetails.OthersMeetingMinutes = dr.GetString("OthersMeetingMinutes");
     GetDetails.Designation = dr.GetString("Designation");
     GetDetails.ShareHoldingStructure = dr.GetInt32("ShareHoldingStructure");
     GetDetails.ConsiderationCurrency = dr.GetInt32("ConsiderationCurrency");
     GetDetails.ConsiderationAmount = dr.GetString("ConsiderationAmount");
     GetDetails.NameVendor = dr.GetString("NameVendor");
     GetDetails.IsROPlaceOfMeeting = dr.GetBoolean("ISROPlaceOfMeeting");
     GetDetails.MeetingAddressLine1 = dr.GetString("MeetingAddressLine1");
     GetDetails.MeetingAddressLine2 = dr.GetString("MeetingAddressLine2");
     GetDetails.MeetingAddressLine3 = dr.GetString("MeetingAddressLine3");
     GetDetails.MeetingAddressCountry = dr.GetInt32("MeetingAddressCountry");
     GetDetails.MeetingAddressPostalCode = dr.GetString("MeetingAddressPostalCode");
     GetDetails.PropertyAddressLine1 = dr.GetString("PropertyAddressLine1");
     GetDetails.PropertyAddressLine2 = dr.GetString("PropertyAddressLine2");
     GetDetails.PropertyAddressLine3 = dr.GetString("PropertyAddressLine3");
     GetDetails.PropertyAddressCountry = dr.GetInt32("PropertyAddressCountry");
     GetDetails.PropertyAddressPostalCode = dr.GetString("PropertyAddressPostalCode");
     return GetDetails;
 }
        /// <summary>
        /// Description  : To Get EGM Details by WOID.
        /// Created By   : Shiva  
        /// Created Date : 2nd Sep 2014
        /// Modified By  :
        /// Modified Date:
        /// </summary>
        /// <returns>EGM Details.</returns>
        public static WOEGMAcquisitionDisposal GetEGMDetailsByWOID(int WOID)
        {
            var WOEGMData = new WOEGMAcquisitionDisposal();

            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(CSS2.Models.ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SPGetEGMDetailsByWOID", sqlParams);
                var safe = new SafeDataReader(reader);
                while (reader.Read())
                {
                    WOEGMData.FetchEGMByWOID(WOEGMData, safe);
                }

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