Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if(!Page.IsPostBack)
     {
         this.CurrentProductID = this.ProductID;
         using (UsageConfigurationProvider provider = new UsageConfigurationProvider())
         {
             ProductVersions.DataSource = provider.GetProductVersions(this.ProductID);
             ProductVersions.DataBind();
         }
         this.LoadContent();
     }
 }
Ejemplo n.º 2
0
 private void LoadContent()
 {
     using (UsageConfigurationProvider provider = new UsageConfigurationProvider())
     {
         Product product = provider.GetProduct(this.CurrentProductID);
         ProductName5.Text = /*ProductName4.Text = ProductName3.Text = ProductName2.Text = ProductName1.Text = */product.PublicName;
         this.Title = String.Format("Применяемость {0}", ProductName5.Text);
         HeaderDateLiteral.Text = string.Format(HeaderDateLiteral.Text, DateTime.Now.ToShortDateString(), DateTime.Now.ToLongTimeString());
         ProductUsage.DataSource = provider.GetProductUsage(this.CurrentProductID);
         ProductUsage.DataBind();
         ProductUsageChange.DataSource = provider.GetProductUsageChange(this.CurrentProductID);
         ProductUsageChange.DataBind();
         ProductSpec.DataSource = provider.GetProductSpecification(this.CurrentProductID);
         ProductSpec.DataBind();
         ProductSpecChange.DataSource = provider.GetProductSpecificationChange(this.CurrentProductID);
         ProductSpecChange.DataBind();
     }
 }
Ejemplo n.º 3
0
        public static string GetApplicability(Guid prodid)
        {
            List<transfer_appl> returnList = new List<transfer_appl>();
            using (UsageConfigurationProvider provider = new UsageConfigurationProvider())
            {
                DataSet dataSet = provider.GetApplicability(prodid);

                foreach (DataRow row in dataSet.Tables[0].Rows)
                {
                    returnList.Add(new transfer_appl()
                    {
                        prod_id = row.Field<Guid>("ProductOwnerID"),
                        pn1 = row.Field<string>("pn1"),
                        pn2 = row.Field<string>("pn2"),
                        count = Convert.ToInt32(row["Quantity"]),
                        order_number = row.Field<string>("OrderNumber"),
                        order_year = row.Field<string>("OrderYear"),
                        top_ware = (Convert.ToInt32(row["top"]) != 0),
                        version = Convert.ToInt32(row["Version"]),
                        actual = (Convert.ToInt32(row["Actual"]) != 0)
                    });
                }
            }

            JavaScriptSerializer serializer = new JavaScriptSerializer();
            return serializer.Serialize(returnList);
        }