private Boolean CanTurnSyndication(FlyerMeDS.fly_orderRow order) { return(String.Compare(order.status, Order.flyerstatus.Sent.ToString(), true) == 0 || String.Compare(order.status, Order.flyerstatus.Scheduled.ToString(), true) == 0 || String.Compare(order.status, Order.flyerstatus.Queued.ToString(), true) == 0 || String.Compare(order.layout, "ccc", true) == 0); }
private String GetMarket(FlyerMeDS.fly_orderRow order) { String result = null; if (!String.IsNullOrEmpty(order.market_county)) { result = String.Format("<strong>Market County(s):</strong> {0}", order.market_county.Replace("|", ", ")); } else if (!String.IsNullOrEmpty(order.market_msa)) { result = String.Format("<strong>Market MSA(s):</strong> {0}", order.market_msa.Replace("|", ", ")); } else if (!String.IsNullOrEmpty(order.market_association)) { result = String.Format("<strong>Market Association(s):</strong> {0}", order.market_association.Replace("|", ", ")); } return(result); }
private Boolean CanDeleteOrder(FlyerMeDS.fly_orderRow order) { return(String.Compare(order.status, Order.flyerstatus.Incomplete.ToString(), true) == 0 || String.Compare(order.status, Order.flyerstatus.Sent.ToString(), true) == 0 || String.Compare(order.layout, "ccc", true) == 0); }
private Boolean CanCopyOrder(FlyerMeDS.fly_orderRow order) { return(String.Compare(order.status, Order.flyerstatus.Sent.ToString(), true) != 0); }
private Boolean CanEditAndResend(FlyerMeDS.fly_orderRow order) { return(String.Compare(order.status, Order.flyerstatus.Sent.ToString(), true) == 0 || String.Compare(order.status, Order.flyerstatus.Scheduled.ToString(), true) == 0 || String.Compare(order.status, Order.flyerstatus.Queued.ToString(), true) == 0); }
private void SetLinks(FlyerMeDS.fly_orderRow order, RepeaterItemEventArgs e) { var hyperLink = e.Item.FindControl("hlSendThisFlyerToClients") as HyperLink; if (String.Compare(order.status, Order.flyerstatus.Sent.ToString(), true) == 0 || String.Compare(order.status, Order.flyerstatus.Scheduled.ToString(), true) == 0 || String.Compare(order.status, Order.flyerstatus.Queued.ToString(), true) == 0) { hyperLink.NavigateUrl = String.Format("~/sendtoclients.aspx?orderid={0}", order.order_id.ToString()); } else { hyperLink.CssClass += " gray"; } var linkButton = e.Item.FindControl("lbEditAndResend") as LinkButton; if (CanEditAndResend(order)) { linkButton.CommandArgument = order.order_id.ToString(); } else { linkButton.Enabled = false; linkButton.CssClass += " gray"; } hyperLink = e.Item.FindControl("hlPostToCraigslist") as HyperLink; if (String.Compare(order.status, Order.flyerstatus.Sent.ToString(), true) == 0 || String.Compare(order.status, Order.flyerstatus.Scheduled.ToString(), true) == 0 || String.Compare(order.status, Order.flyerstatus.Queued.ToString(), true) == 0) { hyperLink.NavigateUrl = "~/posttocraigslist.aspx?orderid=" + order.order_id.ToString(); } else { hyperLink.CssClass += " gray"; } hyperLink = e.Item.FindControl("hlDeliveryReport") as HyperLink; if (String.Compare(order.status, Order.flyerstatus.Sent.ToString(), true) == 0) { hyperLink.NavigateUrl = "~/deliveryreport.aspx?orderid=" + order.order_id.ToString(); } else { hyperLink.CssClass += "gray"; } linkButton = e.Item.FindControl("lbTurnSyndication") as LinkButton; if (CanTurnSyndication(order)) { linkButton.CommandArgument = order.order_id.ToString(); } else { linkButton.Enabled = false; linkButton.CssClass += " gray"; } var literal = e.Item.FindControl("ltlTurnSyndication") as Literal; if (order.IsSyndicat) { literal.Text = "OFF"; } else { literal.Text = "ON"; } hyperLink = e.Item.FindControl("hlViewThisFlyer") as HyperLink; if (!String.IsNullOrEmpty(order.markup)) { hyperLink.NavigateUrl = String.Format("~/preview.aspx?orderid={0}", order.order_id.ToString()); } else { hyperLink.CssClass += " gray"; } hyperLink = e.Item.FindControl("hlEditThisFlyer") as HyperLink; if (String.Compare(order.status, Order.flyerstatus.Incomplete.ToString(), true) == 0) { hyperLink.NavigateUrl = GetCreateFlyerUrl(order.type, order.order_id.ToString()); hyperLink.Text = "Complete flyer"; } else { hyperLink.CssClass += " gray"; } linkButton = e.Item.FindControl("lbCreateCopy") as LinkButton; if (CanCopyOrder(order)) { linkButton.CommandArgument = order.order_id.ToString(); } else { linkButton.Enabled = false; linkButton.CssClass += " gray"; } linkButton = e.Item.FindControl("lbDeleteThisFlyer") as LinkButton; if (CanDeleteOrder(order)) { linkButton.CommandArgument = order.order_id.ToString(); } else { linkButton.Enabled = false; linkButton.CssClass += " gray"; } }
public bool Update(Order order) { FlyerMeDS.fly_orderDataTable orders = Adapter.GetOrderByOrderID(Convert.ToInt32(order.order_id)); if (orders.Count == 0) { // no matching record found, return false return(false); } FlyerMeDS.fly_orderRow orderrow = orders[0]; orderrow.customer_id = order.customer_id; if (order.type == null) { orderrow.SettypeNull(); } else { orderrow.type = order.type; } if (order.photo_type == null) { orderrow.Setphoto_typeNull(); } else { orderrow.photo_type = order.photo_type; } if (order.market_state == null) { orderrow.Setmarket_stateNull(); } else { orderrow.market_state = order.market_state; } if (order.market_county == null) { orderrow.Setmarket_countyNull(); } else { orderrow.market_county = order.market_county; } if (order.market_association == null) { orderrow.Setmarket_associationNull(); } else { orderrow.market_association = order.market_association; } if (order.market_msa == null) { orderrow.Setmarket_msaNull(); } else { orderrow.market_msa = order.market_msa; } orderrow.tota_price = order.tota_price; orderrow.invoice_tax = order.invoice_tax; if (order.invoice_promocode == null) { orderrow.Setinvoice_promocodeNull(); } else { orderrow.invoice_promocode = order.invoice_promocode; } if (order.invoice_transaction_id == null) { orderrow.Setinvoice_transaction_idNull(); } else { orderrow.invoice_transaction_id = order.invoice_transaction_id; } if (order.status == null) { orderrow.SetstatusNull(); } else { orderrow.status = order.status; } if (order.headline == null) { orderrow.SetheadlineNull(); } else { orderrow.headline = order.headline; } if (order.theme == null) { orderrow.SetthemeNull(); } else { orderrow.theme = order.theme; } if (order.layout == null) { orderrow.SetlayoutNull(); } else { orderrow.layout = order.layout; } if (order.delivery_date == null) { orderrow.Setdelivery_dateNull(); } else { orderrow.delivery_date = order.delivery_date; } if (order.mls_number == null) { orderrow.Setmls_numberNull(); } else { orderrow.mls_number = order.mls_number; } if (order.email_subject == null) { orderrow.Setemail_subjectNull(); } else { orderrow.email_subject = order.email_subject; } if (order.title == null) { orderrow.SettitleNull(); } else { orderrow.title = order.title; } if (order.sub_title == null) { orderrow.Setsub_titleNull(); } else { orderrow.sub_title = order.sub_title; } if (order.prop_address1 == null) { orderrow.Setprop_address1Null(); } else { orderrow.prop_address1 = order.prop_address1; } if (order.prop_address2 == null) { orderrow.Setprop_address2Null(); } else { orderrow.prop_address2 = order.prop_address2; } if (order.prop_city == null) { orderrow.Setprop_cityNull(); } else { orderrow.prop_city = order.prop_city; } if (order.prop_state == null) { orderrow.Setprop_stateNull(); } else { orderrow.prop_state = order.prop_state; } if (order.prop_zipcode == null) { orderrow.Setprop_zipcodeNull(); } else { orderrow.prop_zipcode = order.prop_zipcode; } if (order.prop_desc == null) { orderrow.Setprop_descNull(); } else { orderrow.prop_desc = order.prop_desc; } if (order.prop_price == null) { orderrow.Setprop_priceNull(); } else { orderrow.prop_price = order.prop_price; } if (order.bullet1 == null) { orderrow.Setbullet1Null(); } else { orderrow.bullet1 = order.bullet1; } if (order.bullet2 == null) { orderrow.Setbullet2Null(); } else { orderrow.bullet2 = order.bullet2; } if (order.bullet3 == null) { orderrow.Setbullet3Null(); } else { orderrow.bullet3 = order.bullet3; } if (order.bullet4 == null) { orderrow.Setbullet4Null(); } else { orderrow.bullet4 = order.bullet4; } if (order.bullet5 == null) { orderrow.Setbullet5Null(); } else { orderrow.bullet5 = order.bullet5; } if (order.bullet6 == null) { orderrow.Setbullet6Null(); } else { orderrow.bullet6 = order.bullet6; } if (order.bullet7 == null) { orderrow.Setbullet7Null(); } else { orderrow.bullet7 = order.bullet7; } if (order.bullet8 == null) { orderrow.Setbullet8Null(); } else { orderrow.bullet8 = order.bullet8; } if (order.custom_field1 == null) { orderrow.Setcustom_field1Null(); } else { orderrow.custom_field1 = order.custom_field1; } if (order.custom_field2 == null) { orderrow.Setcustom_field2Null(); } else { orderrow.custom_field2 = order.custom_field2; } if (order.custom_field3 == null) { orderrow.Setcustom_field3Null(); } else { orderrow.custom_field3 = order.custom_field3; } if (order.custom_field4 == null) { orderrow.Setcustom_field4Null(); } else { orderrow.custom_field4 = order.custom_field4; } if (order.custom_field5 == null) { orderrow.Setcustom_field5Null(); } else { orderrow.custom_field5 = order.custom_field5; } if (order.custom_field6 == null) { orderrow.Setcustom_field6Null(); } else { orderrow.custom_field6 = order.custom_field6; } if (order.custom_field7 == null) { orderrow.Setcustom_field7Null(); } else { orderrow.custom_field7 = order.custom_field7; } if (order.custom_field8 == null) { orderrow.Setcustom_field8Null(); } else { orderrow.custom_field8 = order.custom_field8; } if (order.custom_field9 == null) { orderrow.Setcustom_field9Null(); } else { orderrow.custom_field9 = order.custom_field9; } if (order.custom_field10 == null) { orderrow.Setcustom_field10Null(); } else { orderrow.custom_field10 = order.custom_field10; } if (order.custom_field_value1 == null) { orderrow.Setcustom_field_value1Null(); } else { orderrow.custom_field_value1 = order.custom_field_value1; } if (order.custom_field_value2 == null) { orderrow.Setcustom_field_value2Null(); } else { orderrow.custom_field_value2 = order.custom_field_value2; } if (order.custom_field_value3 == null) { orderrow.Setcustom_field_value3Null(); } else { orderrow.custom_field_value3 = order.custom_field_value3; } if (order.custom_field_value4 == null) { orderrow.Setcustom_field_value4Null(); } else { orderrow.custom_field_value4 = order.custom_field_value4; } if (order.custom_field_value5 == null) { orderrow.Setcustom_field_value5Null(); } else { orderrow.custom_field_value5 = order.custom_field_value5; } if (order.custom_field_value6 == null) { orderrow.Setcustom_field_value6Null(); } else { orderrow.custom_field_value6 = order.custom_field_value6; } if (order.custom_field_value7 == null) { orderrow.Setcustom_field_value7Null(); } else { orderrow.custom_field_value7 = order.custom_field_value7; } if (order.custom_field_value8 == null) { orderrow.Setcustom_field_value8Null(); } else { orderrow.custom_field_value8 = order.custom_field_value8; } if (order.custom_field_value9 == null) { orderrow.Setcustom_field_value9Null(); } else { orderrow.custom_field_value9 = order.custom_field_value9; } if (order.custom_field_value10 == null) { orderrow.Setcustom_field_value10Null(); } else { orderrow.custom_field_value10 = order.custom_field_value10; } if (order.mls_link == null) { orderrow.Setmls_linkNull(); } else { orderrow.mls_link = order.mls_link; } if (order.virtualtour_link == null) { orderrow.Setvirtualtour_linkNull(); } else { orderrow.virtualtour_link = order.virtualtour_link; } if (order.map_link == null) { orderrow.Setmap_linkNull(); } else { orderrow.map_link = order.map_link; } //if (order.use_mls_logo == null) orderrow.Setuse_mls_logoNull(); //else orderrow.use_mls_logo = order.use_mls_logo; //if (order.use_housing_logo == null) orderrow.Setuse_housing_logoNull(); //else orderrow.use_housing_logo = order.use_housing_logo; if (order.markup == null) { orderrow.SetmarkupNull(); } else { orderrow.markup = order.markup; } if (order.flyer == null) { orderrow.SetflyerNull(); } else { orderrow.flyer = order.flyer; } if (order.price_range_min == null) { orderrow.Setprice_range_minNull(); } else { orderrow.price_range_min = order.price_range_min; } if (order.price_range_max == null) { orderrow.Setprice_range_maxNull(); } else { orderrow.price_range_max = order.price_range_max; } if (order.property_type == null) { orderrow.Setproperty_typeNull(); } else { orderrow.property_type = order.property_type; } if (order.sqft_range_min == null) { orderrow.Setsqft_range_minNull(); } else { orderrow.sqft_range_min = order.sqft_range_min; } if (order.sqft_range_max == null) { orderrow.Setsqft_range_maxNull(); } else { orderrow.sqft_range_max = order.sqft_range_max; } if (order.location == null) { orderrow.SetlocationNull(); } else { orderrow.location = order.location; } if (order.more_info == null) { orderrow.Setmore_infoNull(); } else { orderrow.more_info = order.more_info; } if (order.buyer_message == null) { orderrow.Setbuyer_messageNull(); } else { orderrow.buyer_message = order.buyer_message; } if (order.photo1 == null) { orderrow.Setphoto1Null(); } else { orderrow.photo1 = order.photo1; } if (order.photo2 == null) { orderrow.Setphoto2Null(); } else { orderrow.photo2 = order.photo2; } if (order.photo3 == null) { orderrow.Setphoto3Null(); } else { orderrow.photo3 = order.photo3; } if (order.photo4 == null) { orderrow.Setphoto4Null(); } else { orderrow.photo4 = order.photo4; } if (order.photo5 == null) { orderrow.Setphoto5Null(); } else { orderrow.photo5 = order.photo5; } if (order.photo6 == null) { orderrow.Setphoto6Null(); } else { orderrow.photo6 = order.photo6; } if (order.photo7 == null) { orderrow.Setphoto7Null(); } else { orderrow.photo7 = order.photo7; } if (order.photo8 == null) { orderrow.Setphoto8Null(); } else { orderrow.photo8 = order.photo8; } if (order.photo9 == null) { orderrow.Setphoto9Null(); } else { orderrow.photo9 = order.photo9; } if (order.photo10 == null) { orderrow.Setphoto10Null(); } else { orderrow.photo10 = order.photo10; } if (order.field1 == null) { orderrow.Setfield1Null(); } else { orderrow.field1 = order.field1; } if (order.field2 == null) { orderrow.Setfield2Null(); } else { orderrow.field2 = order.field2; } if (order.field3 == null) { orderrow.Setfield3Null(); } else { orderrow.field3 = order.field3; } if (order.field4 == null) { orderrow.Setfield4Null(); } else { orderrow.field4 = order.field4; } if (order.field5 == null) { orderrow.Setfield5Null(); } else { orderrow.field5 = order.field5; } if (order.created_on == null) { orderrow.Setcreated_onNull(); } else { orderrow.created_on = order.created_on; } if (order.updated_on == null) { orderrow.Setupdated_onNull(); } else { orderrow.updated_on = order.updated_on; } if (order.sent_on == null) { orderrow.Setsent_onNull(); } else { orderrow.sent_on = order.sent_on; } orderrow.LastPageNo = order.LastPageNo; //========New Fields================================== if (order.Bedrooms == null) { orderrow.SetBedroomsNull(); } else { orderrow.Bedrooms = order.Bedrooms; } if (order.FullBaths == null) { orderrow.SetFullBathsNull(); } else { orderrow.FullBaths = order.FullBaths; } if (order.HalfBaths == null) { orderrow.SetHalfBathsNull(); } else { orderrow.HalfBaths = order.HalfBaths; } if (order.Parking == null) { orderrow.SetParkingNull(); } else { orderrow.Parking = order.Parking; } if (order.SqFoots == null) { orderrow.SetSqFootsNull(); } else { orderrow.SqFoots = order.SqFoots; } if (order.YearBuilt == null) { orderrow.SetYearBuiltNull(); } else { orderrow.YearBuilt = order.YearBuilt; } if (order.Floors == null) { orderrow.SetFloorsNull(); } else { orderrow.Floors = order.Floors; } if (order.LotSize == null) { orderrow.SetLotSizeNull(); } else { orderrow.LotSize = order.LotSize; } if (order.Subdivision == null) { orderrow.SetSubdivisionNull(); } else { orderrow.Subdivision = order.Subdivision; } if (order.HOA == null) { orderrow.SetHOANull(); } else { orderrow.HOA = order.HOA; } if (order.PropertyFeatures == null) { orderrow.SetPropertyFeaturesNull(); } else { orderrow.PropertyFeatures = order.PropertyFeatures; } if (order.PropertyFeaturesValues == null) { orderrow.SetPropertyFeaturesValuesNull(); } else { orderrow.PropertyFeaturesValues = order.PropertyFeaturesValues; } if (order.OtherPropertyFeatures == null) { orderrow.SetOtherPropertyFeaturesNull(); } else { orderrow.OtherPropertyFeatures = order.OtherPropertyFeatures; } orderrow.Discount = order.Discount; orderrow.fk_PropertyCategory = order.PropertyCategory; orderrow.fk_PropertyType = order.PropertyType; if (order.AptSuiteBldg == null) { orderrow.SetAptSuiteBldgNull(); } else { orderrow.AptSuiteBldg = order.AptSuiteBldg; } if (order.OpenHouses == null) { orderrow.SetOpenHousesNull(); } else { orderrow.OpenHouses = order.OpenHouses; } //==================================================== // Update the order record int rowsAffected = Adapter.Update(orderrow); // Return true if precisely one row was updated, // otherwise false return(rowsAffected == 1); }
/// -----------------------------------------------------------------------------/// /// <summary> ///<para>Initialize order object using orderid supplied</para> /// </summary> /// <remarks> /// </remarks> /// <history> /// </history> /// -----------------------------------------------------------------------------/// public Order(int orderid) { OrdersBLL ordersBLL = new OrdersBLL(); FlyerMeDS.fly_orderDataTable orderTable = ordersBLL.Adapter.GetOrderByOrderID(orderid); if (orderTable.Rows.Count > 0) { FlyerMeDS.fly_orderRow data = (FlyerMeDS.fly_orderRow)orderTable.Rows[0]; if (!Convert.IsDBNull(data["order_id"])) { _order_id = (long)data["order_id"]; } if (!Convert.IsDBNull(data["customer_id"])) { _customer_id = (string)data["customer_id"]; } if (!Convert.IsDBNull(data["type"])) { _type = (string)data["type"]; } if (!Convert.IsDBNull(data["photo_type"])) { _photo_type = (string)data["photo_type"]; } if (!Convert.IsDBNull(data["market_state"])) { _market_state = (string)data["market_state"]; } if (!Convert.IsDBNull(data["market_county"])) { _market_county = (string)data["market_county"]; } if (!Convert.IsDBNull(data["market_association"])) { _market_association = (string)data["market_association"]; } if (!Convert.IsDBNull(data["market_msa"])) { _market_msa = (string)data["market_msa"]; } if (!Convert.IsDBNull(data["tota_price"])) { _tota_price = (decimal)data["tota_price"]; } if (!Convert.IsDBNull(data["invoice_tax"])) { _invoice_tax = (decimal)data["invoice_tax"]; } if (!Convert.IsDBNull(data["invoice_promocode"])) { _invoice_promocode = (string)data["invoice_promocode"]; } if (!Convert.IsDBNull(data["invoice_transaction_id"])) { _invoice_transaction_id = (string)data["invoice_transaction_id"]; } if (!Convert.IsDBNull(data["status"])) { _status = (string)data["status"]; } if (!Convert.IsDBNull(data["headline"])) { _headline = (string)data["headline"]; } if (!Convert.IsDBNull(data["theme"])) { _theme = (string)data["theme"]; } if (!Convert.IsDBNull(data["layout"])) { _layout = (string)data["layout"]; } if (!Convert.IsDBNull(data["delivery_date"])) { _delivery_date = (DateTime)data["delivery_date"]; } if (!Convert.IsDBNull(data["mls_number"])) { _mls_number = (string)data["mls_number"]; } if (!Convert.IsDBNull(data["email_subject"])) { _email_subject = (string)data["email_subject"]; } if (!Convert.IsDBNull(data["title"])) { _title = (string)data["title"]; } if (!Convert.IsDBNull(data["sub_title"])) { _sub_title = (string)data["sub_title"]; } if (!Convert.IsDBNull(data["prop_address1"])) { _prop_address1 = (string)data["prop_address1"]; } if (!Convert.IsDBNull(data["prop_address2"])) { _prop_address2 = (string)data["prop_address2"]; } if (!Convert.IsDBNull(data["prop_city"])) { _prop_city = (string)data["prop_city"]; } if (!Convert.IsDBNull(data["prop_state"])) { _prop_state = (string)data["prop_state"]; } if (!Convert.IsDBNull(data["prop_zipcode"])) { _prop_zipcode = (string)data["prop_zipcode"]; } if (!Convert.IsDBNull(data["prop_desc"])) { _prop_desc = (string)data["prop_desc"]; } if (!Convert.IsDBNull(data["prop_price"])) { _prop_price = (string)data["prop_price"]; } if (!Convert.IsDBNull(data["bullet1"])) { _bullet1 = (string)data["bullet1"]; } if (!Convert.IsDBNull(data["bullet2"])) { _bullet2 = (string)data["bullet2"]; } if (!Convert.IsDBNull(data["bullet3"])) { _bullet3 = (string)data["bullet3"]; } if (!Convert.IsDBNull(data["bullet4"])) { _bullet4 = (string)data["bullet4"]; } if (!Convert.IsDBNull(data["bullet5"])) { _bullet5 = (string)data["bullet5"]; } if (!Convert.IsDBNull(data["bullet6"])) { _bullet6 = (string)data["bullet6"]; } if (!Convert.IsDBNull(data["bullet7"])) { _bullet7 = (string)data["bullet7"]; } if (!Convert.IsDBNull(data["bullet8"])) { _bullet8 = (string)data["bullet8"]; } if (!Convert.IsDBNull(data["custom_field1"])) { _custom_field1 = (string)data["custom_field1"]; } if (!Convert.IsDBNull(data["custom_field2"])) { _custom_field2 = (string)data["custom_field2"]; } if (!Convert.IsDBNull(data["custom_field3"])) { _custom_field3 = (string)data["custom_field3"]; } if (!Convert.IsDBNull(data["custom_field4"])) { _custom_field4 = (string)data["custom_field4"]; } if (!Convert.IsDBNull(data["custom_field5"])) { _custom_field5 = (string)data["custom_field5"]; } if (!Convert.IsDBNull(data["custom_field6"])) { _custom_field6 = (string)data["custom_field6"]; } if (!Convert.IsDBNull(data["custom_field7"])) { _custom_field7 = (string)data["custom_field7"]; } if (!Convert.IsDBNull(data["custom_field8"])) { _custom_field8 = (string)data["custom_field8"]; } if (!Convert.IsDBNull(data["custom_field9"])) { _custom_field9 = (string)data["custom_field9"]; } if (!Convert.IsDBNull(data["custom_field10"])) { _custom_field10 = (string)data["custom_field10"]; } if (!Convert.IsDBNull(data["custom_field_value1"])) { _custom_field_value1 = (string)data["custom_field_value1"]; } if (!Convert.IsDBNull(data["custom_field_value2"])) { _custom_field_value2 = (string)data["custom_field_value2"]; } if (!Convert.IsDBNull(data["custom_field_value3"])) { _custom_field_value3 = (string)data["custom_field_value3"]; } if (!Convert.IsDBNull(data["custom_field_value4"])) { _custom_field_value4 = (string)data["custom_field_value4"]; } if (!Convert.IsDBNull(data["custom_field_value5"])) { _custom_field_value5 = (string)data["custom_field_value5"]; } if (!Convert.IsDBNull(data["custom_field_value6"])) { _custom_field_value6 = (string)data["custom_field_value6"]; } if (!Convert.IsDBNull(data["custom_field_value7"])) { _custom_field_value7 = (string)data["custom_field_value7"]; } if (!Convert.IsDBNull(data["custom_field_value8"])) { _custom_field_value8 = (string)data["custom_field_value8"]; } if (!Convert.IsDBNull(data["custom_field_value9"])) { _custom_field_value9 = (string)data["custom_field_value9"]; } if (!Convert.IsDBNull(data["custom_field_value10"])) { _custom_field_value10 = (string)data["custom_field_value10"]; } if (!Convert.IsDBNull(data["mls_link"])) { _mls_link = (string)data["mls_link"]; } if (!Convert.IsDBNull(data["virtualtour_link"])) { _virtualtour_link = (string)data["virtualtour_link"]; } if (!Convert.IsDBNull(data["map_link"])) { _map_link = (string)data["map_link"]; } if (!Convert.IsDBNull(data["use_mls_logo"])) { _use_mls_logo = (bool)data["use_mls_logo"]; } if (!Convert.IsDBNull(data["use_housing_logo"])) { _use_housing_logo = (bool)data["use_housing_logo"]; } if (!Convert.IsDBNull(data["markup"])) { _markup = (string)data["markup"]; } if (!Convert.IsDBNull(data["flyer"])) { _flyer = (string)data["flyer"]; } if (!Convert.IsDBNull(data["price_range_min"])) { _price_range_min = (string)data["price_range_min"]; } if (!Convert.IsDBNull(data["price_range_max"])) { _price_range_max = (string)data["price_range_max"]; } if (!Convert.IsDBNull(data["property_type"])) { _property_type = (string)data["property_type"]; } if (!Convert.IsDBNull(data["sqft_range_min"])) { _sqft_range_min = (string)data["sqft_range_min"]; } if (!Convert.IsDBNull(data["sqft_range_max"])) { _sqft_range_max = (string)data["sqft_range_max"]; } if (!Convert.IsDBNull(data["location"])) { _location = (string)data["location"]; } if (!Convert.IsDBNull(data["more_info"])) { _more_info = (string)data["more_info"]; } if (!Convert.IsDBNull(data["buyer_message"])) { _buyer_message = (string)data["buyer_message"]; } if (!Convert.IsDBNull(data["photo1"])) { _photo1 = (string)data["photo1"]; } if (!Convert.IsDBNull(data["photo2"])) { _photo2 = (string)data["photo2"]; } if (!Convert.IsDBNull(data["photo3"])) { _photo3 = (string)data["photo3"]; } if (!Convert.IsDBNull(data["photo4"])) { _photo4 = (string)data["photo4"]; } if (!Convert.IsDBNull(data["photo5"])) { _photo5 = (string)data["photo5"]; } if (!Convert.IsDBNull(data["photo6"])) { _photo6 = (string)data["photo6"]; } if (!Convert.IsDBNull(data["photo7"])) { _photo7 = (string)data["photo7"]; } if (!Convert.IsDBNull(data["photo8"])) { _photo8 = (string)data["photo8"]; } if (!Convert.IsDBNull(data["photo9"])) { _photo9 = (string)data["photo9"]; } if (!Convert.IsDBNull(data["photo10"])) { _photo10 = (string)data["photo10"]; } if (!Convert.IsDBNull(data["field1"])) { _field1 = (string)data["field1"]; } if (!Convert.IsDBNull(data["field2"])) { _field2 = (string)data["field2"]; } if (!Convert.IsDBNull(data["field3"])) { _field3 = (string)data["field3"]; } if (!Convert.IsDBNull(data["field4"])) { _field4 = (string)data["field4"]; } if (!Convert.IsDBNull(data["field5"])) { _field5 = (string)data["field5"]; } if (!Convert.IsDBNull(data["created_on"])) { _created_on = (DateTime)data["created_on"]; } if (!Convert.IsDBNull(data["updated_on"])) { _updated_on = (DateTime)data["updated_on"]; } if (!Convert.IsDBNull(data["sent_on"])) { _sent_on = (DateTime)data["sent_on"]; } //============New Fields======================================================================== if (!Convert.IsDBNull(data["LastPageNo"])) { _LastPageNo = (int)data["LastPageNo"]; } if (!Convert.IsDBNull(data["Bedrooms"])) { _Bedrooms = (string)data["Bedrooms"]; } if (!Convert.IsDBNull(data["FullBaths"])) { _FullBaths = (string)data["FullBaths"]; } if (!Convert.IsDBNull(data["HalfBaths"])) { _HalfBaths = (string)data["HalfBaths"]; } if (!Convert.IsDBNull(data["Parking"])) { _Parking = (string)data["Parking"]; } if (!Convert.IsDBNull(data["SqFoots"])) { _SqFoots = (string)data["SqFoots"]; } if (!Convert.IsDBNull(data["YearBuilt"])) { _YearBuilt = (string)data["YearBuilt"]; } if (!Convert.IsDBNull(data["Floors"])) { _Floors = (string)data["Floors"]; } if (!Convert.IsDBNull(data["LotSize"])) { _LotSize = (string)data["LotSize"]; } if (!Convert.IsDBNull(data["Subdivision"])) { _Subdivision = (string)data["Subdivision"]; } if (!Convert.IsDBNull(data["HOA"])) { _HOA = (string)data["HOA"]; } if (!Convert.IsDBNull(data["PropertyFeatures"])) { _PropertyFeatures = (string)data["PropertyFeatures"]; } if (!Convert.IsDBNull(data["PropertyFeaturesValues"])) { _PropertyFeaturesValues = (string)data["PropertyFeaturesValues"]; } if (!Convert.IsDBNull(data["OtherPropertyFeatures"])) { _OtherPropertyFeatures = (string)data["OtherPropertyFeatures"]; } if (!Convert.IsDBNull(data["Discount"])) { _Discount = (decimal)data["Discount"]; } if (!Convert.IsDBNull(data["fk_PropertyCategory"])) { _PropertyCategory = (int)data["fk_PropertyCategory"]; } if (!Convert.IsDBNull(data["fk_PropertyType"])) { _PropertyType = (int)data["fk_PropertyType"]; } if (!Convert.IsDBNull(data["IsSyndicat"])) { _IsSyndicat = (bool)data["IsSyndicat"]; } if (!Convert.IsDBNull(data["AptSuiteBldg"])) { _AptSuiteBldg = (String)data["AptSuiteBldg"]; } if (!Convert.IsDBNull(data["OpenHouses"])) { _OpenHouses = (String)data["OpenHouses"]; } //=============================================================================================== } }