Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        user = (clsUser)Session["user"];
        if (user == null)
        {
            Response.Redirect("~/Site_Login.aspx");
            Session.Clear();
        }
        string newProduct_id = Request["NewProduct"];

        if (!IsPostBack)
        {
            clsNewProduct newProd = DBLayer.getNewSaturationById(newProduct_id);
            newProduct_Name.Text     = newProd.itemName;
            newProduct_Code.Text     = newProd.itemCode;
            newProduct_Glu.Text      = newProd.glu;
            newProduct_Division.Text = newProd.productDivision;
            newProduct_Price.Text    = newProd.priceNet;
            newProduct_uom.Text      = newProd.uom;
            lblChannel.Text          = newProd.channel;
            lblDateCreated.Text      = DateTime.Parse(newProd.createdAt).ToString("MM.dd.yyyy");
            lblDatePipeline.Text     = DateTime.Parse(newProd.pipeline).ToString("MM.yyyy");
            lblDateSaturation.Text   = DateTime.Parse(newProd.saturation).ToString("MM.yyyy");
        }
        rprtDatabind(newProduct_id);
    }
Ejemplo n.º 2
0
 protected void newProdRptr_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         clsNewProduct newProd     = (clsNewProduct)e.Item.DataItem;
         Label         pipelineLbl = (Label)e.Item.FindControl("pipelineDate");
         pipelineLbl.Text = DateTime.Parse(newProd.pipeline).ToString("MM.dd.yyyy");
         Label saturationLbl = (Label)e.Item.FindControl("saturationDate");
         saturationLbl.Text = DateTime.Parse(newProd.saturation).ToString("MM.dd.yyyy");
         Label dateCreatedLbl = (Label)e.Item.FindControl("dateCreated");
         dateCreatedLbl.Text = DateTime.Parse(newProd.createdAt).ToString("MM.dd.yyyy");
     }
 }
Ejemplo n.º 3
0
    public static string SubmitNewProductSetup(string newprodId, string newprodPrice, string newprodUom, string newprodRemarks)
    {
        clsUser       userId  = (clsUser)HttpContext.Current.Session["user"];
        clsNewProduct newProd = new clsNewProduct();

        newProd.ul_item_id = newprodId;
        newProd.uom        = newprodUom;
        newProd.remarks    = newprodRemarks;
        newProd.priceNet   = newprodPrice;
        newProd.createdAt  = DBLayer.GetCurrentTime().ToString();
        newProd.createdBy  = userId.Id;
        string newProd_Id = DBLayer.addNewProduct(newProd);

        DBLayer.addNewProductChannel(newProd_Id);
        return("newproduct_view?NewProductDetails=" + newProd_Id);
    }
Ejemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        user = (clsUser)Session["user"];
        if (user == null)
        {
            Response.Redirect("~/Site_Login.aspx");
            Session.Clear();
        }
        string        newProduct_id = Request["NewProductDetails"];
        clsNewProduct newProd       = DBLayer.getNewProductById(newProduct_id);

        newProduct_Name.Text     = newProd.itemName;
        newProduct_Code.Text     = newProd.itemCode;
        newProduct_Glu.Text      = newProd.glu;
        newProduct_Division.Text = newProd.productDivision;
        newProduct_Price.Text    = newProd.priceNet;
        newProduct_uom.Text      = newProd.uom;
        //List<clsChannel> newProdChannelStatus = DBLayer.getNewProdChannelStatusByID(newProduct_id);
        //newProdChannelStatusRptr.DataSource = newProdChannelStatus;
        //newProdChannelStatusRptr.DataBind();
        //    lblDateCreated.Text = DateTime.Parse(newProd.createdAt).ToString("MM-dd-yyyy");
        //    lblDatePipeline.Text = DateTime.Parse(newProd.pipeline).ToString("MM-dd-yyyy");
        //    lblDateSaturation.Text = DateTime.Parse(newProd.saturation).ToString("MM-dd-yyyy");
    }