Beispiel #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_Book bocProductProfile = new BOC_Corporate_ProdProf_Book())
        {
            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_Books(eocPropertyBean);
            grvSellLead02.DataBind();
        }

        Session["SELL_LEAD_FROMDATE"] = strFromDate;
        Session["SELL_LEAD_TODATE"]   = strToDate;
    }
Beispiel #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_Book bocProductProfile = new BOC_Corporate_ProdProf_Book())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();

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

                grvSellLead02.DataSource = bocProductProfile.SellLead_OrderDetail(eocPropertyBean);
                grvSellLead02.DataBind();
            }
        }
    }
    /// <summary>
    /// Inserts a new row for Book both in Product_Master and Product_Seller_Detail table.
    /// </summary>
    /// <returns></returns>
    private int Add_MasterRecord_BookProduct()
    {
        int intActionResult = 0;

        try
        {
            using (BOC_Corporate_ProdProf_Book bocProductProfile = new BOC_Corporate_ProdProf_Book())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();

                eocPropertyBean.Business_UserProfile_ProfileID  = Convert.ToInt32(txtProfileID.Text);
                eocPropertyBean.Category_CategoryID             = Convert.ToInt32(txtCategoryID.Text);
                eocPropertyBean.Subcategory_SubcategoryID       = Convert.ToInt32(txtSubcategoryID.Text);
                eocPropertyBean.SecondSubcategory_SubcategoryID = Convert.ToInt32(txtSecondSubcatID.Text);

                eocPropertyBean.Business_ProductProfile_Books_BookTitle       = lblProductTitle.Text;
                eocPropertyBean.Business_ProductProfile_Books_SKU             = lblSku.Text;
                eocPropertyBean.Business_ProductProfile_Books_BookDescription = txtDescription.Text;
                eocPropertyBean.Business_ProductProfile_Books_Quantity        = Convert.ToInt32(lblQuantity.Text);

                eocPropertyBean.Business_ProductProfile_Books_Currency     = lblCurrency.Text;
                eocPropertyBean.Business_ProductProfile_Books_ProductPrice = Convert.ToDouble(lblProductPrice.Text);

                if (lblSalePrice.Text != "")
                {
                    eocPropertyBean.Business_ProductProfile_Books_SalePrice = Convert.ToDouble(lblSalePrice.Text);
                    eocPropertyBean.Business_ProductProfile_Books_StartDate = Convert.ToDateTime(lblSaleFromDate.Text);
                    eocPropertyBean.Business_ProductProfile_Books_EndDate   = Convert.ToDateTime(lblSaleToDate.Text);
                }
                else
                {
                    eocPropertyBean.Business_ProductProfile_Books_SalePrice = 0.00;
                    eocPropertyBean.Business_ProductProfile_Books_StartDate = DateTime.Now;
                    eocPropertyBean.Business_ProductProfile_Books_EndDate   = DateTime.Now;
                }

                eocPropertyBean.Business_Product_Profile_Books_Condition     = lblCondition.Text;
                eocPropertyBean.Business_Product_Profile_Books_ConditionNote = txtConditionNote.Text;
                eocPropertyBean.Business_ProductProfile_Books_PaymentOption  = ddlPaymentOption.SelectedValue;
                eocPropertyBean.Business_ProductProfile_Books_DeliveryArea   = ddlDeliveryArea.SelectedItem.Text;

                if (ddlPaymentOption.SelectedValue == "COD")
                {
                    eocPropertyBean.Business_ProductProfile_Books_CashOnDeliveryCost = Convert.ToDouble(txtCODCost.Text);
                }
                else
                {
                    eocPropertyBean.Business_ProductProfile_Books_CashOnDeliveryCost = 0.00;
                }


                eocPropertyBean.Business_ProductProfile_Books_PaperBackForBook  = txtPaperBack.Text;
                eocPropertyBean.Business_Product_Profile_Books_Language         = txtLanguage.Text;
                eocPropertyBean.Business_Product_Profile_Books_DimensionForBook = txtDimensionForBook.Text;
                eocPropertyBean.Business_Product_Profile_Books_ShippingWeight   = txtShippingWeight.Text;
                eocPropertyBean.Business_ProductProfile_Books_Edition           = txtEdition.Text;
                eocPropertyBean.Business_ProductProfile_Books_ISBN      = txtISBN.Text;
                eocPropertyBean.Business_ProductProfile_Books_Author    = txtAuthor.Text;
                eocPropertyBean.Business_ProductProfile_Books_Publisher = txtPublisher.Text;

                if (string.IsNullOrEmpty(txtImagePath.Text))
                {
                    eocPropertyBean.Business_ProductProfile_Books_ProductImage = @"../Corporate_ProductImage/default.png";
                }
                else
                {
                    eocPropertyBean.Business_ProductProfile_Books_ProductImage = txtImagePath.Text;
                }

                eocPropertyBean.UserType = businessSeller;

                eocPropertyBean.UpdatedOn = DateTime.Now;
                eocPropertyBean.Business_ProductProfile_IsActive = chkIsActive.Checked;

                intActionResult = bocProductProfile.Insert_MasterRecord_BookProduct(eocPropertyBean);
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }
        return(intActionResult);
    }
    /// <summary>
    /// Updates Book Record of the tag seller.
    /// </summary>
    /// <returns></returns>
    private int Update_TagSeller_BookRecord()
    {
        int intActionResult = 0;

        try
        {
            using (BOC_Corporate_ProdProf_Book bocProductProfile = new BOC_Corporate_ProdProf_Book())
            {
                EOC_PropertyBean eocPropertyBean = new EOC_PropertyBean();
                eocPropertyBean.Business_UserProfile_ProfileID          = Convert.ToInt32(txtProfileID.Text);
                eocPropertyBean.Business_ProductProfile_Books_ProductID = Convert.ToInt32(txtProductID.Text);

                eocPropertyBean.Business_ProductProfile_Books_BookDescription = txtDescription.Text;
                eocPropertyBean.Business_ProductProfile_Books_Quantity        = Convert.ToInt32(lblQuantity.Text);
                eocPropertyBean.Business_ProductProfile_Books_Currency        = lblCurrency.Text;
                eocPropertyBean.Business_ProductProfile_Books_ProductPrice    = Convert.ToDouble(lblProductPrice.Text);

                if (lblSalePrice.Text != "")
                {
                    eocPropertyBean.Business_ProductProfile_Books_SalePrice = Convert.ToDouble(lblSalePrice.Text);
                    eocPropertyBean.Business_ProductProfile_Books_StartDate = Convert.ToDateTime(lblSaleFromDate.Text);
                    eocPropertyBean.Business_ProductProfile_Books_EndDate   = Convert.ToDateTime(lblSaleToDate.Text);
                }
                else
                {
                    eocPropertyBean.Business_ProductProfile_Books_SalePrice = 0.00;
                    eocPropertyBean.Business_ProductProfile_Books_StartDate = DateTime.Now;
                    eocPropertyBean.Business_ProductProfile_Books_EndDate   = DateTime.Now;
                }

                eocPropertyBean.Business_Product_Profile_Books_Condition     = lblCondition.Text;
                eocPropertyBean.Business_Product_Profile_Books_ConditionNote = txtConditionNote.Text;
                eocPropertyBean.Business_ProductProfile_Books_PaymentOption  = ddlPaymentOption.SelectedValue;
                eocPropertyBean.Business_ProductProfile_Books_DeliveryArea   = ddlDeliveryArea.SelectedItem.Text;
                if (ddlPaymentOption.SelectedValue == "COD")
                {
                    eocPropertyBean.Business_ProductProfile_Books_CashOnDeliveryCost = Convert.ToDouble(txtCODCost.Text);
                }
                else
                {
                    eocPropertyBean.Business_ProductProfile_Books_CashOnDeliveryCost = 0.00;
                }



                eocPropertyBean.Business_ProductProfile_Books_PaperBackForBook  = txtPaperBack.Text;
                eocPropertyBean.Business_Product_Profile_Books_Language         = txtLanguage.Text;
                eocPropertyBean.Business_Product_Profile_Books_DimensionForBook = txtDimensionForBook.Text;
                eocPropertyBean.Business_Product_Profile_Books_ShippingWeight   = txtShippingWeight.Text;


                eocPropertyBean.UserType = businessSeller;

                eocPropertyBean.UpdatedOn = DateTime.Now;
                eocPropertyBean.Business_ProductProfile_IsActive = chkIsActive.Checked;

                intActionResult = bocProductProfile.Update_TagSeller_BookRecord(eocPropertyBean);
            }
        }
        catch (Exception Exp)
        {
            lblSystemMessage.Text = Exp.Message.ToString();
        }

        return(intActionResult);
    }
Beispiel #5
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");
                        }
                    }
                }
            }
        }
    }