Ejemplo n.º 1
0
    private void GetSellLead_ProductList()
    {
        this.strFromDate = ddlStartMonth1.SelectedItem.Value + "/" + ddlStartDay1.SelectedItem.Value + "/" + ddlStartYear1.SelectedItem.Value;
        this.strToDate   = ddlEndMonth1.SelectedItem.Value + "/" + ddlEndDay1.SelectedItem.Value + "/" + ddlEndYear1.SelectedItem.Value;

        using (BOC_Corporate_ProdProf_GeneralItems bocProductProfile = new BOC_Corporate_ProdProf_GeneralItems())
        {
            EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();

            eocPropertyBean.Business_UserProfile_ProfileID = intProfileID;
            eocPropertyBean.FromDate = Convert.ToDateTime(strFromDate);
            eocPropertyBean.ToDate   = Convert.ToDateTime(strToDate);

            grvSellLead02.DataSource = bocProductProfile.SellLead_Set02_ProductList_General(eocPropertyBean);
            grvSellLead02.DataBind();
        }

        Session["SELL_LEAD_FROMDATE"] = strFromDate;
        Session["SELL_LEAD_TODATE"]   = strToDate;
    }
Ejemplo n.º 2
0
    private void GetSellLead_OrderDetail()
    {
        if (this.Session["SELL_LEAD_FROMDATE"] != null || this.Session["SELL_LEAD_TODATE"] != null || string.IsNullOrEmpty(Request.QueryString["Email"]) == false)
        {
            strFromDate      = this.Session["SELL_LEAD_FROMDATE"].ToString();
            strToDate        = this.Session["SELL_LEAD_TODATE"].ToString();
            strCustomerEmail = Request.QueryString["Email"];

            using (BOC_Corporate_ProdProf_GeneralItems bocProductProfile = new BOC_Corporate_ProdProf_GeneralItems())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();

                eocPropertyBean.Business_UserProfile_ProfileID = intProfileID;
                eocPropertyBean.Business_OrderDetail_GeneralItems_CustomerEmail = strCustomerEmail;
                eocPropertyBean.FromDate = Convert.ToDateTime(strFromDate);
                eocPropertyBean.ToDate   = Convert.ToDateTime(strToDate);

                grvSellLead02.DataSource = bocProductProfile.SellLead_OrderDetail(eocPropertyBean);
                grvSellLead02.DataBind();
            }
        }
    }
Ejemplo n.º 3
0
    protected void btnUpload_Click(object sender, EventArgs e)
    {
        string productID       = string.Empty;
        string imagePath       = string.Empty;
        string itemType        = string.Empty;
        int    intActionResult = 0;

        productID = Request.QueryString["PID"];
        itemType  = Request.QueryString["ItemType"];

        if (!string.IsNullOrEmpty(productID) && !string.IsNullOrEmpty(itemType))
        {
            if (UTLUtilities.IsNumeric(productID))
            {
                //GENERAL ITEMS:
                if (itemType == "GenItem")
                {
                    imagePath = @"ImageHolder\GeneralItems\" + productID + ".jpg";

                    if (FileUpload1.HasFile)
                    {
                        FileUpload1.SaveAs(Server.MapPath(@"..\ImageHolder\GeneralItems\") + productID + ".jpg");
                    }

                    using (BOC_Corporate_ProdProf_GeneralItems bocProductProfile1 = new BOC_Corporate_ProdProf_GeneralItems())
                    {
                        EOC_PropertyBean eocPropertyBean1 = new EOC_PropertyBean();
                        eocPropertyBean1.Business_ProductProfile_GeneralItems_ProductID    = Convert.ToInt32(productID);
                        eocPropertyBean1.Business_ProductProfile_GeneralItems_ProductImage = imagePath;

                        intActionResult = bocProductProfile1.UpdateRecord_ProductImage(eocPropertyBean1);

                        if (intActionResult > 0)
                        {
                            Response.Redirect("ProductProfile_General.aspx");
                        }
                    }
                }

                //BOOKS:
                if (itemType == "Book")
                {
                    imagePath = @"ImageHolder\Books\" + productID + ".jpg";

                    if (FileUpload1.HasFile)
                    {
                        FileUpload1.SaveAs(Server.MapPath(@"..\ImageHolder\Books\") + productID + ".jpg");
                    }

                    using (BOC_Corporate_ProdProf_Book bocProductProfile2 = new BOC_Corporate_ProdProf_Book())
                    {
                        EOC_PropertyBean eocPropertyBean2 = new EOC_PropertyBean();
                        eocPropertyBean2.Business_ProductProfile_Books_ProductID    = Convert.ToInt32(productID);
                        eocPropertyBean2.Business_ProductProfile_Books_ProductImage = imagePath;

                        intActionResult = bocProductProfile2.UpdateRecord_ProductImage(eocPropertyBean2);

                        if (intActionResult > 0)
                        {
                            Response.Redirect("ProductProfile_Books.aspx");
                        }
                    }
                }
            }
        }
    }