/// <summary> /// Tests for the violation of limits that can only be determined after the actor has been built /// </summary> internal void DynamicsPostcheck() { if (_dynActor != null && _isPhysical) { EnforceMinimumDynamicDimensions(); //this can turn off the physical flag EnforceMaximumDynamicDimensions(); //this can turn off the physical flag if (_isPhysical) //the above can disable the physical flag, so recheck here { EnsureObjectAboveGround(); PenetrationStatus penStatus = TryRezDepenetrate(); switch (penStatus) { case PenetrationStatus.AcceptablePenetration: //temporarily disable CCD to allow natural depenetration TempDisableCCD(); break; case PenetrationStatus.CriticalPenetration: //kill all non-ground contacts KillCurrentContacts(); break; } } } }
private void LoadParameters() { if (!string.IsNullOrEmpty(this.Page.Request.QueryString["productName"])) { this.productName = Globals.UrlDecode(this.Page.Request.QueryString["productName"]); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["productCode"])) { this.productCode = Globals.UrlDecode(this.Page.Request.QueryString["productCode"]); } int value = 0; if (int.TryParse(this.Page.Request.QueryString["categoryId"], out value)) { this.categoryId = new int?(value); } int value2 = 0; if (int.TryParse(this.Page.Request.QueryString["brandId"], out value2)) { this.dropBrandList.SelectedValue = new int?(value2); } int value3 = 0; if (int.TryParse(this.Page.Request.QueryString["lineId"], out value3)) { this.lineId = new int?(value3); } int value4 = 0; if (int.TryParse(this.Page.Request.QueryString["tagId"], out value4)) { this.tagId = new int?(value4); } int value5 = 0; if (int.TryParse(this.Page.Request.QueryString["typeId"], out value5)) { this.typeId = new int?(value5); } int value6 = 0; if (int.TryParse(this.Page.Request.QueryString["distributorId"], out value6)) { this.distributorId = new int?(value6); } bool.TryParse(this.Page.Request.QueryString["isAlert"], out this.isAlert); if (!string.IsNullOrEmpty(this.Page.Request.QueryString["SaleStatus"])) { this.saleStatus = (ProductSaleStatus)System.Enum.Parse(typeof(ProductSaleStatus), this.Page.Request.QueryString["SaleStatus"]); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["PenetrationStatus"])) { this.penetrationStatus = (PenetrationStatus)System.Enum.Parse(typeof(PenetrationStatus), this.Page.Request.QueryString["PenetrationStatus"]); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["startDate"])) { this.startDate = new System.DateTime?(System.DateTime.Parse(this.Page.Request.QueryString["startDate"])); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["endDate"])) { this.endDate = new System.DateTime?(System.DateTime.Parse(this.Page.Request.QueryString["endDate"])); } this.txtSearchText.Text = this.productName; this.txtSKU.Text = this.productCode; this.dropCategories.DataBind(); this.dropCategories.SelectedValue = this.categoryId; this.dropLines.DataBind(); this.dropLines.SelectedValue = this.lineId; this.dropTagList.DataBind(); this.dropTagList.SelectedValue = this.tagId; this.calendarStartDate.SelectedDate = this.startDate; this.calendarEndDate.SelectedDate = this.endDate; this.dropType.SelectedValue = this.typeId; this.dropDistributor.SelectedValue = this.distributorId; this.chkIsAlert.Checked = this.isAlert; this.dropPenetrationStatus.SelectedValue = this.penetrationStatus; this.dropSaleStatus.SelectedValue = this.saleStatus; }
private void LoadParameters() { if (!string.IsNullOrEmpty(this.Page.Request.QueryString["productName"])) { this.productName = Globals.UrlDecode(this.Page.Request.QueryString["productName"]); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["productCode"])) { this.productCode = Globals.UrlDecode(this.Page.Request.QueryString["productCode"]); } int value = 0; if (int.TryParse(this.Page.Request.QueryString["categoryId"], out value)) { this.categoryId = new int?(value); } int value2 = 0; if (int.TryParse(this.Page.Request.QueryString["brandId"], out value2)) { this.dropBrandList.SelectedValue = new int?(value2); } int value3 = 0; if (int.TryParse(this.Page.Request.QueryString["lineId"], out value3)) { this.lineId = new int?(value3); } int value4 = 0; if (int.TryParse(this.Page.Request.QueryString["tagId"], out value4)) { this.tagId = new int?(value4); } int value5 = 0; if (int.TryParse(this.Page.Request.QueryString["typeId"], out value5)) { this.typeId = new int?(value5); } int value6 = 0; if (int.TryParse(this.Page.Request.QueryString["distributorId"], out value6)) { this.distributorId = new int?(value6); } bool.TryParse(this.Page.Request.QueryString["isAlert"], out this.isAlert); if (!string.IsNullOrEmpty(this.Page.Request.QueryString["SaleStatus"])) { this.saleStatus = (ProductSaleStatus)System.Enum.Parse(typeof(ProductSaleStatus), this.Page.Request.QueryString["SaleStatus"]); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["PenetrationStatus"])) { this.penetrationStatus = (PenetrationStatus)System.Enum.Parse(typeof(PenetrationStatus), this.Page.Request.QueryString["PenetrationStatus"]); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["startDate"])) { this.startDate = new System.DateTime?(System.DateTime.Parse(this.Page.Request.QueryString["startDate"])); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["endDate"])) { this.endDate = new System.DateTime?(System.DateTime.Parse(this.Page.Request.QueryString["endDate"])); } if (!string.IsNullOrEmpty(this.Page.Request.QueryString["shareId"])) { this.shareId = new int?(System.Convert.ToInt32(this.Page.Request.QueryString["shareId"])); } if (this.shareId.HasValue && this.shareId.Value > 0) { this.TemporaryProductId = null; string value7 = Globals.HostPath(System.Web.HttpContext.Current.Request.Url) + "/WapShop/ShareProducts.aspx?Id=" + this.shareId.Value; ShareProductInfo shareProductInfoById = ProductHelper.GetShareProductInfoById(this.shareId.Value); string text = this.Create_ImgCode(value7, 10); shareProductInfoById.ShareUrl = text; if (ProductHelper.UpdateShareLine(shareProductInfoById)) { this.panlproducts.Visible = false; this.SharePanel.Visible = true; this.imgurl.ImageUrl = text; this.txtlink.Value = value7; } } this.txtSearchText.Text = this.productName; this.dropCategories.DataBind(); this.dropCategories.SelectedValue = this.categoryId; this.dropTagList.DataBind(); this.dropTagList.SelectedValue = this.tagId; this.calendarStartDate.SelectedDate = this.startDate; this.calendarEndDate.SelectedDate = this.endDate; this.dropType.SelectedValue = this.typeId; }
private void LoadParameters() { if (!Page.IsPostBack) { if (!string.IsNullOrEmpty(Page.Request.QueryString["productName"])) { productName = Globals.UrlDecode(Page.Request.QueryString["productName"]); } if (!string.IsNullOrEmpty(Page.Request.QueryString["productCode"])) { productCode = Globals.UrlDecode(Page.Request.QueryString["productCode"]); } if (!string.IsNullOrEmpty(Page.Request.QueryString["categoryId"])) { int result = 0; if (int.TryParse(Page.Request.QueryString["categoryId"], out result)) { categoryId = new int?(result); } } if (!string.IsNullOrEmpty(Page.Request.QueryString["PenetrationStatus"])) { penetrationStatus = (PenetrationStatus)Enum.Parse(typeof(PenetrationStatus), Page.Request.QueryString["PenetrationStatus"]); } if (!string.IsNullOrEmpty(Page.Request.QueryString["lineId"])) { int num2 = 0; if (int.TryParse(Page.Request.QueryString["lineId"], out num2)) { lineId = new int?(num2); } } if (!string.IsNullOrEmpty(Page.Request.QueryString["brandId"])) { int num3 = 0; if (int.TryParse(Page.Request.QueryString["brandId"], out num3)) { brandId = new int?(num3); } } if (!string.IsNullOrEmpty(Page.Request.QueryString["distributorId"])) { int num4 = 0; if (int.TryParse(Page.Request.QueryString["distributorId"], out num4)) { distributorId = new int?(num4); } } txtProductName.Text = productName; txtSku.Text = productCode; } else { productName = txtProductName.Text; productCode = txtSku.Text; categoryId = dropCategories.SelectedValue; penetrationStatus = droppenetrationStatus.SelectedValue; if (dropBrandList.SelectedValue.HasValue) { brandId = new int?(Convert.ToInt32(dropBrandList.SelectedValue)); } else { brandId = null; } lineId = dropProductLine.SelectedValue; distributorId = ddlDistributor.SelectedValue; } }