/// <summary> /// инициализация контролов /// </summary> protected override void EntityFieldInit() { if (!V4IsPostBack) { id = Request.QueryString["id"]; idDoc = Request.QueryString["idDoc"]; idParentPage = Request.QueryString["idpp"]; ue = Request.QueryString["ue"]; ParentPage = KescoHub.GetPage(idParentPage) as DocPage; if (ParentPage == null) { ShowMessage(Resx.GetString("errRetrievingPageObject"), Resx.GetString("errPrinting"), MessageStatus.Error); return; } if (!string.IsNullOrEmpty(id) && id != "0") { factUsl = new FactUsl(id); //factUsl = GetObjectById(typeof(FactUsl), id) as FactUsl; if (factUsl == null || factUsl.Id == "0") { throw new LogicalException(Resx.GetString("TTN_ ERRMoveStockInitialized"), "", Assembly.GetExecutingAssembly().GetName(), Priority.Info); } } else { factUsl = new FactUsl { DocumentId = int.Parse(idDoc) }; RenderAgent1(); RenderAgent2(); efChanged.ChangedByID = null; } SetInitValue(); } Entity = factUsl; efResource.BindStringValue = factUsl.ResourceIdBind; efResourceRus.BindStringValue = factUsl.ResourceRusBind; chAgent1.BindStringValue = factUsl.Agent1Bind; chAgent2.BindStringValue = factUsl.Agent2Bind; efResourceLat.BindStringValue = factUsl.ResourceLatBind; efUnit.BindStringValue = factUsl.UnitIdBind; efCount.BindStringValue = factUsl.CountBind; efMCoef.BindStringValue = factUsl.CoefBind; efCostOutNDS.BindStringValue = factUsl.CostOutNDSBind; efStavkaNDS.BindStringValue = factUsl.StavkaNDSIdBind; efSummaOutNDS.BindStringValue = factUsl.SummaOutNDSBind; efSummaNDS.BindStringValue = factUsl.SummaNDSBind; efVsego.BindStringValue = factUsl.VsegoBind; base.EntityFieldInit(); }
protected override void EntityInitialization(Entity copy = null) { Entity = new FactUsl(); }