Пример #1
0
        /// <summary>
        /// This gets the community information block
        /// </summary>
        /// <param name="CommunityNumber"></param>
        /// <returns></returns>
        public string CommunityInformationSnapIn()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("<table border=\"0\" cellspacing=\"0\" cellpadding=\"3\" style=\"width:325px;\">");
            sb.AppendLine("<tr>");
            sb.AppendLine("<td style=\"background-color:#f7f7f7;border:3px solid #efefef;\">");
            sb.AppendFormat("<div style=\"color: #4a6d94; padding-bottom: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 12px; font-weight: bold;\">{0}</div>", CommunityName);

            sb.AppendFormat("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"width:100%;margin-bottom:5px;\">");
            sb.AppendFormat("<tbody>");
            sb.AppendFormat("<tr>");
            sb.AppendFormat("<td style=\"background-color:#FFFFFF;padding:10px;border-top:#e5e5e5 1px solid;border-bottom:#d2d2d2 1px solid;border-left:#dbdbdb 1px solid;border-right:#dbdbdb 1px solid;width: 100%;\"> ");
            sb.AppendFormat("<img src=\"../../../../../../../images/Community/{0}0.jpg\" width='120' style=\"padding:0px 7px 0px 0px;\" align='left' >", CommunityNumber);

            sb.AppendFormat("<div class=\"ContactInformation\" style=\"font-family:Helvetica, Arial, sans-serif;font-size:11px;line-height:14px;color:#999999;\">");

            if (Address1.WhenNullOrEmpty(string.Empty).Length > 0 && City.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendLine(Address1 + "<br>");
                if (Address2.WhenNullOrEmpty(string.Empty).Length > 0)
                {
                    sb.AppendLine(Address2 + "<br>");
                }
                sb.AppendLine(City + ",");
                sb.AppendLine(State + " " + Country);
                sb.AppendLine(PostalCode + "<br>");
            }
            if (PhoneNumber1.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendFormat("Phone: {0}<br />", PhoneNumber1);
            }
            if (FaxNumber.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendFormat("Fax: {0}<br />", FaxNumber);
            }
            sb.AppendFormat("</div>");

            if (Region.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendFormat("<br><div style=\"font-family:Helvetica, Arial, sans-serif;font-size:12px;font-weight:bold;color:#999999;\">Region: {0}</div>", Region.WhenNullOrEmpty("&nbsp;"));
            }
            if (Division.WhenNullOrEmpty(string.Empty).Length > 0)
            {
                sb.AppendFormat("<div style=\"font-family:Helvetica, Arial, sans-serif;font-size:12px;font-weight:bold;color:#999999;\">Division: {0}</div>", Division.WhenNullOrEmpty("&nbsp;"));
            }

            sb.AppendFormat("</td>");
            sb.AppendFormat("</tr>");
            sb.AppendFormat("</tbody>");
            sb.AppendFormat("</table>");

            sb.AppendFormat("</td>");
            sb.AppendFormat("</tr>");
            sb.AppendFormat("</tbody>");
            sb.AppendFormat("</table>");

            return(sb.ToString());
        }
Пример #2
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="PhoneNumber1">A phone number.</param>
        /// <param name="PhoneNumber2">Another phone number.</param>
        /// <returns>true|false</returns>
        public static Boolean operator >(PhoneNumber PhoneNumber1, PhoneNumber PhoneNumber2)
        {
            if ((Object)PhoneNumber1 == null)
            {
                throw new ArgumentNullException(nameof(PhoneNumber1), "The given PhoneNumber1 must not be null!");
            }

            return(PhoneNumber1.CompareTo(PhoneNumber2) > 0);
        }
Пример #3
0
        /// <summary>
        /// Compares two instances of this object.
        /// </summary>
        /// <param name="PhoneNumber1">A phone number.</param>
        /// <param name="PhoneNumber2">Another phone number.</param>
        /// <returns>true|false</returns>
        public static Boolean operator ==(PhoneNumber PhoneNumber1, PhoneNumber PhoneNumber2)
        {
            // If both are null, or both are same instance, return true.
            if (Object.ReferenceEquals(PhoneNumber1, PhoneNumber2))
            {
                return(true);
            }

            // If one is null, but not both, return false.
            if (((Object)PhoneNumber1 == null) || ((Object)PhoneNumber2 == null))
            {
                return(false);
            }

            return(PhoneNumber1.Equals(PhoneNumber2));
        }
Пример #4
0
        public void Update()
        {
            string        strsql        = "update Branch set " + "CompanyId= " + CompanyId + ", " + "BranchName= '" + BranchName.Replace("'", "''") + "', " + "AddressLine1= '" + AddressLine1.Replace("'", "''") + "', " + "AddressLine2= '" + AddressLine2.Replace("'", "''") + "', " + "CityId= " + CityId + ", " + "Pincode= '" + Pincode.Replace("'", "''") + "', " + "StateId= " + StateId + ", " + "CountryId= " + CountryId + ", " + "PhoneNumber1= '" + PhoneNumber1.Replace("'", "''") + "', " + "PhoneNumber2= '" + PhoneNumber2.Replace("'", "''") + "', " + "EmailId1= '" + EmailId1.Replace("'", "''") + "', " + "EmailId2= '" + EmailId2.Replace("'", "''") + "' " + " where ID =" + Id;
            SqlConnection ObjConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["MyJobPortal"].ConnectionString);

            ObjConnection.Open();
            SqlCommand ObjCommand = new SqlCommand(strsql, ObjConnection);

            ObjCommand.ExecuteNonQuery();
            ObjConnection.Dispose();
            ObjCommand.Dispose();
        }
Пример #5
0
 /// <summary>
 /// Compares two instances of this object.
 /// </summary>
 /// <param name="PhoneNumber1">A phone number.</param>
 /// <param name="PhoneNumber2">Another phone number.</param>
 /// <returns>true|false</returns>
 public static Boolean operator >=(Phone_Number PhoneNumber1, Phone_Number PhoneNumber2)
 => PhoneNumber1.CompareTo(PhoneNumber2) >= 0;
Пример #6
0
 /// <summary>
 /// Compares two instances of this object.
 /// </summary>
 /// <param name="PhoneNumber1">A phone number.</param>
 /// <param name="PhoneNumber2">Another phone number.</param>
 /// <returns>true|false</returns>
 public static Boolean operator !=(Phone_Number PhoneNumber1, Phone_Number PhoneNumber2)
 => !PhoneNumber1.Equals(PhoneNumber2);