예제 #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int intErrorCnt = 0;
            string strErrMsg = "";

            if (txtMemberName.Text.Trim() == "")
            {
                intErrorCnt++;
                strErrMsg = "Membership Name should not be empty.<br />";
            }
            if (intErrorCnt == 0)
            {
                ServeAtDoorstepData.MembershipDetails objData = new MembershipDetails();
                objData.MemberShipID = Convert.ToInt32(hdnMemberId.Value.ToString());
                objData.MemberShipName = txtMemberName.Text.Trim();
                objData.MemberShipType = txtMemberType.Text.Trim();
                objData.MemberShipAmount = Convert.ToDecimal(txtAmount.Text.Trim());
                objData.MemberShipDays = Convert.ToInt32(txtDays.Text.Trim());

                objService = new ServeAtDoorstepService();
                int i = objService.AddMembership(objData);

                this.ModalPopupViewMessage.Hide();
                BindMemberGrid();
                ClearData();

            }
            else
            {
                divErrorMsg.InnerHtml = strErrMsg;
                this.ModalPopupViewMessage.Show();

            }
        }
        protected void btnSaveBank_Click(object sender, EventArgs e)
        {
            int intErrorBank = 0;
            string strErrorBank = "";

            if (intErrorBank == 0)
            {
                ServeAtDoorstepData.CusBankDetails objBankdet = new ServeAtDoorstepData.CusBankDetails();
                objBankdet.BankId = Convert.ToInt32(sBankId);
                objBankdet.CustomerId = Convert.ToInt32(sCustomerId);
                objBankdet.BankName = txtBankname.Value.ToString();
                objBankdet.CardHolderName = txtCardholdername.Value.ToString();
                objBankdet.CreditCardNumber = txtCredCardnumber.Value.ToString();
                objBankdet.CVCNumber = txtCVC.Value.ToString();

                objService = new ServeAtDoorstepService();
                int i = objService.AddCustomerBankdet(objBankdet);

                this.modalpopBank.Hide();
                LoadProfile();
            }
            else
            {
                this.modalpopBank.Show();
                divErrorBank.InnerHtml = strErrorBank;
            }
        }
예제 #3
0
        protected void gvVendorMessage_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "VIEW")
            {
                int index = Convert.ToInt32(e.CommandArgument);
                string S= gvVendorMessage.DataKeys[index].Value.ToString();

                ServeAtDoorstepService objService = new ServeAtDoorstepService();
                DataTable dtMsg = objService.SelectVenMessageById(Convert.ToInt32(S));

                if (dtMsg.Rows.Count > 0)
                {
                    for (int i = 0; i < dtMsg.Rows.Count; i++)
                    {
                        //lblMsgTitle.Text = dtMsg.Rows[i]["MessageTitle"].ToString();
                        //lblMsgDesc.Text = dtMsg.Rows[i]["Description"].ToString();
                        //lblMsgDate.Text = dtMsg.Rows[i]["CreatedOn"].ToString();
                        //lblCustomerName.Text = dtMsg.Rows[i]["CustomerName"].ToString();
                        //lblCategory.Text = dtMsg.Rows[i]["CategoryName"].ToString();
                    }
                }

                //pupMessage.ShowPopupWindow();
            }
        }
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            strErrorMessage = "";
            intVaidError = 0;
            CheckValidation();
            if (intVaidError == 0)
            {
                ServeAtDoorstepData.CustomerDetails objCusDetails = new ServeAtDoorstepData.CustomerDetails();
                objCusDetails.Address = txtAddress.Value.ToString();
                objCusDetails.CityId = Convert.ToInt32(ddlCity.SelectedItem.Value.ToString());
                objCusDetails.CountryId = Convert.ToInt32(ddlCountry.Value.ToString());
                objCusDetails.CustomerID = Convert.ToInt32(sCustomerId);
                objCusDetails.Email = txtEmail.Value.ToString().Trim();
                objCusDetails.FirstName = txtFirstName.Value.ToString();
                objCusDetails.LastName = txtLastName.Value.ToString();
                objCusDetails.Gender = rdoGender.SelectedValue.ToString();
                objCusDetails.LoginName = sLoginname;
                objCusDetails.LoginPassword = sPassword;
                objCusDetails.Mobile = txtMobile.Value.ToString();
                objCusDetails.StateId = Convert.ToInt32(ddlState.SelectedItem.Value.ToString());
                objCusDetails.StreetName = txtStreetname.Value.ToString();
                objCusDetails.ZipCode = txtZipcode.Value.ToString();
                objCusDetails.ImagePath = sImagePath;

                objService = new ServeAtDoorstepService();
                int intCusId = objService.AddCustomerRegister(objCusDetails);

                Response.Redirect("MyCustomerProfile.aspx");
            }
            else
            {
                divErrorMessage.InnerHtml = strErrorMessage;

            }
        }
        void LoadProfile()
        {
            objService = new ServeAtDoorstepService();
            DataTable dtVen = objService.GetCustomerById(Convert.ToInt32(sLoginId));
            if (dtVen.Rows.Count > 0)
            {
                spnCusImage.InnerHtml = "<a class='example-image-link' href='image/Vendor.jpg' data-lightbox='example-1'" +
                                    "title='Vendor'>" +
                                    "<img class='example-image' src='image/Vendor.jpg' alt='Vendor' width='150' height='150' /></a>";

                lblLoginName.Text = dtVen.Rows[0]["LoginName"].ToString();
                lblEmail.Text = dtVen.Rows[0]["VendorEmail"].ToString();
                txtVendorName.Value = dtVen.Rows[0]["VendorName"].ToString();

            //        txtFirstName.Value = dtCus.Rows[0]["FirstName"].ToString();// +" " + dtCus.Rows[0]["LastName"].ToString();
            //        txtLastName.Value = dtCus.Rows[0]["LastName"].ToString();
            //        sLoginname = dtCus.Rows[0]["LoginName"].ToString();
            //        sPassword = dtCus.Rows[0]["LoginPassword"].ToString();
            //        sImagePath = dtCus.Rows[0]["ImagePath"].ToString();
            //        txtEmail.Value = dtCus.Rows[0]["Email"].ToString();
            //        txtMobile.Value = dtCus.Rows[0]["Mobile"].ToString();
            //        rdoGender.SelectedValue = dtCus.Rows[0]["Gender"].ToString();
            //        for (int i = 0; i < ddlCountry.Items.Count; i++)
            //        {
            //            if (ddlCountry.Items[i].Text == dtCus.Rows[0]["CountryName"].ToString())
            //                ddlCountry.SelectedIndex = i;
            //        }
            //        for (int i = 0; i < ddlState.Items.Count; i++)
            //        {
            //            if (ddlState.Items[i].Text == dtCus.Rows[0]["StateName"].ToString())
            //                ddlState.SelectedIndex = i;
            //        }
            //        string sState = dtCus.Rows[0]["StateName"].ToString();
            //        string sStateId = dtCus.Rows[0]["StateId"].ToString();
            //        DataTable dtCy = objService.SelectCityByStateId(Convert.ToInt32(sStateId));
            //        ddlCity.Items.Clear();
            //        ListItem listItem = new ListItem();
            //        listItem.Text = "<Select City>";
            //        listItem.Value = "0";
            //        ddlCity.Items.Add(listItem);
            //        for (int i = 0; i < dtCy.Rows.Count; i++)
            //        {
            //            listItem = new ListItem();
            //            listItem.Text = dtCy.Rows[i]["CityName"].ToString();
            //            listItem.Value = dtCy.Rows[i]["CityId"].ToString();
            //            ddlCity.Items.Add(listItem);
            //        }
            //        for (int i = 0; i < ddlCity.Items.Count; i++)
            //        {
            //            if (ddlCity.Items[i].Text == dtCus.Rows[0]["CityName"].ToString())
            //                ddlCity.SelectedIndex = i;
            //        }
            //        txtAddress.Value = dtCus.Rows[0]["Address"].ToString();
            //        txtStreetname.Value = dtCus.Rows[0]["StreetName"].ToString();
            //        txtZipcode.Value = dtCus.Rows[0]["ZipCode"].ToString();
            //        sBankId = dtCus.Rows[0]["BankId"].ToString();

            //        hdnAddress.Value = dtCus.Rows[0]["CityName"].ToString().Trim() + ", " + dtCus.Rows[0]["StateName"].ToString() + ", US";
            }
        }
예제 #6
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int intErrorCnt = 0;
            string strErrMsg = "";

            if (txtServiceName.Text.Trim() == "")
            {
                intErrorCnt++;
                strErrMsg = "Service Name should not be empty.<br />";
            }
            if (ddlCategory.SelectedIndex==0)
            {
                intErrorCnt++;
                strErrMsg += "Please Select Category.<br />";
            }

            if (txtNoPair.Text.Trim() == "")
            {
                txtNoPair.Text = "0";
            }
            if (intErrorCnt == 0)
            {
                ServeAtDoorstepData.ServiceDetails objData = new ServiceDetails();
                objData.ServiceID = Convert.ToInt32(strServiceID);
                objData.ServiceName = txtServiceName.Text.Trim();
                objData.ServiceDescription = txtServiceDesc.Text.Trim();
                objData.ServiceKeyword = txtServiceKey.Text.Trim();
                objData.ServiceType = txtServiceType.Text.Trim();
                objData.PriceRangeFrom = txtPriceRanFrom.Text.Trim();
                objData.PriceRangeTo = txtPriceRanTo.Text.Trim();
                objData.NoOfPair = Convert.ToInt32(txtNoPair.Text.Trim());
                objData.BrandName = txtBrandName.Text.Trim();
                objData.BrandType = txtBrandType.Text.Trim();
                objData.CategoryId = Convert.ToInt32(ddlCategory.SelectedItem.Value.ToString());

                objService = new ServeAtDoorstepService();
                int i = objService.AddService(objData);

                ScriptManager.RegisterStartupScript(this, this.GetType(), "name", "parent.parent.GB_hide();", true);

                //StringBuilder sb = new StringBuilder();
                //sb.Append("window.opener.RefreshPage();");
                //sb.Append("window.close();");

                //ClientScript.RegisterClientScriptBlock(this.GetType(), "CloseWindowScript",
                //    sb.ToString(), true);

                Response.Write("<script>window.opener.location.reload();</script>");
            }
            else
            {
                divErrorMsg.InnerHtml = strErrMsg;
            }
        }
예제 #7
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int intErrorCnt = 0;
            string strErrMsg = "";

            if (txtServiceName.Text.Trim() == "")
            {
                intErrorCnt++;
                strErrMsg = "Service Name should not be empty.<br />";
            }
            if (ddlCategory.SelectedIndex == 0)
            {
                intErrorCnt++;
                strErrMsg += "Please Select Category.<br />";
            }

            if (txtNoPair.Text.Trim() == "")
            {
                txtNoPair.Text = "0";
            }
            if (intErrorCnt == 0)
            {
                ServeAtDoorstepData.ServiceDetails objData = new ServiceDetails();
                objData.ServiceID = Convert.ToInt32(hdnServiceId.Value.ToString());
                objData.ServiceName = txtServiceName.Text.Trim();
                objData.ServiceDescription = txtServiceDesc.Text.Trim();
                objData.ServiceKeyword = txtServiceKey.Text.Trim();
                objData.ServiceType = txtServiceType.Text.Trim();
                objData.PriceRangeFrom = txtPriceRanFrom.Text.Trim();
                objData.PriceRangeTo = txtPriceRanTo.Text.Trim();
                objData.NoOfPair = Convert.ToInt32(txtNoPair.Text.Trim());
                objData.BrandName = txtBrandName.Text.Trim();
                objData.BrandType = txtBrandType.Text.Trim();
                objData.CategoryId = Convert.ToInt32(ddlCategory.SelectedItem.Value.ToString());

                objService = new ServeAtDoorstepService();
                int i = objService.AddService(objData);

                this.ModalPopupViewMessage.Hide();
                BindServiceGrid();
                ClearData();

            }
            else
            {
                divErrorMsg.InnerHtml = strErrMsg;
                this.ModalPopupViewMessage.Show();

            }
        }
예제 #8
0
        public void BindServiceGrid()
        {
            objService = new ServeAtDoorstepService();
            DataTable dtServ = objService.SelectAllService();

            if (dtServ.Rows.Count > 0)
            {
                //decimal dPageSize = (dt.Rows.Count / 4M);
                //GridView1.PagerSettings.PageButtonCount = Convert.ToInt32(Math.Floor(dPageSize));
                //GridView1.PageSize = Convert.ToInt32(Math.Ceiling(dPageSize));
            }
            gvService.DataSource = dtServ;
            gvService.DataBind();
        }
예제 #9
0
        void LoadCustomerQuiry()
        {
            objService = new ServeAtDoorstepService();
                dtQuote = objService.SelectInquiryByCustomerId(1);

            if (dtQuote.Rows.Count > 0)
            {
            }
            else
            {
            }
            gvQuiry.DataSource = dtQuote.DefaultView;
            gvQuiry.DataBind();
        }
예제 #10
0
        public void BindVendorGrid()
        {
            objService = new ServeAtDoorstepService();
            DataTable dtVend = objService.SelectVendorByService(intServiceID);

            if (dtVend.Rows.Count > 0)
            {
                //decimal dPageSize = (dt.Rows.Count / 4M);
                //GridView1.PagerSettings.PageButtonCount = Convert.ToInt32(Math.Floor(dPageSize));
                //GridView1.PageSize = Convert.ToInt32(Math.Ceiling(dPageSize));
            }
            gvVendor.DataSource = dtVend;
            gvVendor.DataBind();
        }
예제 #11
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int r = 0;
            ServeAtDoorstepData.CategoryDetails objCategory = new CategoryDetails();
            objCategory.CategoryID = 0;
            objCategory.CategoryName = txtcategory.Text.ToString().Trim();
            objCategory.CategoryDescription =txtcategoryDesc.Text.Trim();
            objService = new ServeAtDoorstepService();

            DataTable dt = objService.AvailableCategory(txtcategory.Text.ToString().Trim());
            if (dt.Rows.Count == 0 && txtcategory.Text.ToString().Trim() != "")
                r = objService.AddCategory(objCategory);
            txtcategory.Text = "";
            LoadCategory();
        }
예제 #12
0
        void LoadVendorCount()
        {
            DataTable dtCusCount = null;
            objService = new ServeAtDoorstepService();
            if (sLoginType == "2")
                dtCusCount = objService.GetVendorCountById(Convert.ToInt32(sLoginId));

            if (dtCusCount != null)
            {
                if (dtCusCount.Rows.Count > 0)
                {
                    lnkLiveQuiryCnt.Text = "(" + dtCusCount.Rows[0]["LiveInqCount"].ToString() + ")";
                    lnkQuiryRespondCnt.Text = "(" + dtCusCount.Rows[0]["RespondMsgCount"].ToString() + ")";
                }
            }
        }
예제 #13
0
        protected void btnMsgReply_Click(object sender, EventArgs e)
        {
            VendorMessageDetails objVenMsgDet = new VendorMessageDetails();
            objVenMsgDet.VendorMessageId = 0;
            objVenMsgDet.VendorId = Convert.ToInt32(hdnVendorId.Value.ToString());
            objVenMsgDet.SendCustomerId = Convert.ToInt32(hdnCustomerId.Value.ToString());
            objVenMsgDet.QuiryId = Convert.ToInt32(hdnQuoteId.Value.ToString());
            objVenMsgDet.CategoryId = Convert.ToInt32(hdnCategoryId.Value.ToString());
            objVenMsgDet.MessageTitle =  txtReplySubject.Text.Trim();
            objVenMsgDet.Description = txtMsgReply.Text.Trim();
            objVenMsgDet.Status = "1";

            objService = new ServeAtDoorstepService();
            int i = objService.AddVendorMessage(objVenMsgDet);

            this.ModalPopupReply.Hide();
        }
예제 #14
0
        protected void btnQuiryReply_Click(object sender, ImageClickEventArgs e)
        {
            ImageButton btndetails = sender as ImageButton;
            GridViewRow gvrow = (GridViewRow)btndetails.NamingContainer;
            string sID = gvQuiry.DataKeys[gvrow.RowIndex].Value.ToString();

            ServeAtDoorstepService objService = new ServeAtDoorstepService();
            DataTable dtQ = objService.GetInquiryById(Convert.ToInt32(sID));

            if (dtQ.Rows.Count > 0)
            {
                hdnCategoryId.Value = dtQ.Rows[0]["CategoryId"].ToString();
                hdnCustomerId.Value = dtQ.Rows[0]["CustomerId"].ToString();
                hdnQuoteId.Value = dtQ.Rows[0]["InquiryID"].ToString();
                //hdnVendorId.Value = dtQ.Rows[0]["VendorID"].ToString();
                lblMsgTitle.Text = dtQ.Rows[0]["InquiryTitle"].ToString();
                lblMsgDesc.Text = dtQ.Rows[0]["Description"].ToString();
                lblMsgDate.Text = dtQ.Rows[0]["CreatedOn"].ToString();
                lblVendorName.Text = dtQ.Rows[0]["CustomerName"].ToString();
                lblCategory.Text = dtQ.Rows[0]["CategoryName"].ToString();

                spnInquiryDet.InnerHtml = @"<div style='float: left; display: block; width: 100%;height:150px;padding-left:25px;'>
                            <table>
                                <tr>
                                    <td>
                                        <div>
                                            <img src='" + dtQ.Rows[0]["CustomerImagePath"].ToString() + "' width='100' height='100' />" +
                                        "</div>" +
                                    "</td>" +
                                    "<td>" +
                                        "<div style='margin-left: 25px;font-family:Calibri;font-size:16px;height:25px;'>" + dtQ.Rows[0]["InquiryTitle"].ToString() + "</div>" +
                                        "<div style='margin-left: 25px;font-family:Calibri;font-size:14px;height:25px;'>By " + dtQ.Rows[0]["CustomerName"].ToString() + "</div>" +
                                        "<div style='margin-left: 25px;font-family:Calibri;font-size:12px;height:25px;'>Category - " + dtQ.Rows[0]["CategoryName"].ToString() + "</div>" +
                                        "<div style='margin-left: 25px;font-family:Calibri;font-size:13px;height:25px;'>" + dtQ.Rows[0]["Description"].ToString() + "</div>" +
                                    "</td>" +
                                "</tr>" +
                            "</table>" +
                        "</div>";
            }

            //this.ModalPopupViewMessage.Show();
            txtInquirySubject.Text = "Re: " + dtQ.Rows[0]["InquiryTitle"].ToString();
            this.modpopInquiryReply.Show();
        }
예제 #15
0
        protected void btnReply_Click(object sender, EventArgs e)
        {
            ServeAtDoorstepData.CustomerMessageDetails objMsg = new CustomerMessageDetails();
            objMsg.CustomerMessageId = 0;
            objMsg.QuiryId = Convert.ToInt32(hdnQuoteId.Value.ToString());
            objMsg.SendVendorId = Convert.ToInt32(hdnVendorId.Value.ToString());
            objMsg.RecCustomerId = Convert.ToInt32(hdnCustomerId.Value.ToString());
            objMsg.CategoryId = Convert.ToInt32(hdnCategoryId.Value.ToString());
            objMsg.MessageTitle = "Re: "+lblMsgTitle.Text.Trim(); ;
            objMsg.Description = txtReply.Text.Trim();
            objMsg.Status="";

            objService = new ServeAtDoorstepService();
            int i = objService.AddCustomerMessage(objMsg);

            txtReply.Text = "";

            this.ModalPopupViewMessage.Hide();
        }
예제 #16
0
        public void LoadCategoryDiv()
        {
            objService = new ServeAtDoorstepService();
            DataTable dt1 = objService.SelectAllCategory();

            string sCatInnerHtml = "";
            if (strcurrentLocation == "") strcurrentLocation = "Current Location";
            sCatInnerHtml = @"<br/>
                    <strong>
                        <label id='currentLocation' runat='server'>" + strcurrentLocation + "</label></strong>" +
                    "<small style='color: #C03;'>&nbsp;&nbsp;&nbsp;[Change]</small>" +
                    "<br/>" +
                    "<hr/><strong>Category</strong>";

            for (int i = 0; i < dt1.Rows.Count; i++)
            {
                sCatInnerHtml += "<br><a href='#' class='CatLink' onclick='Category(" + dt1.Rows[i]["CategoryID"].ToString() + ");'>" + dt1.Rows[i]["CategoryName"].ToString() + "</a>";
            }

            sCatInnerHtml += @"<hr>
                <strong>Service Type</strong><br>
                Security Equipment - Products<br>
                Tools - Machinery - Industrial<br>
                TV - DVD - Multimedia<br>
                Video Games - Consoles<br>
                <hr>
                <strong>Service Days</strong><br>
                Monday<br>
                Tuesday<br>
                Wednesday<br>
                Thursday<br>
                Friday<br>
                Saturday<br>
                Sunday<br>
                <hr>
                <strong>Others</strong><br>
                Everything Else<br>
                Home & Lifestyle<br><br>
                ";

            divCategory.InnerHtml = sCatInnerHtml;
        }
예제 #17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ServeAtDoorstepServiceApp.ServeAtDoorstepService objService = new ServeAtDoorstepService();

            if (Request.QueryString["type"] != null)
            {
                strType = Request.QueryString["type"].ToString();
            }
            if (Request.QueryString["id"] != null)
            {
                strId = Request.QueryString["id"].ToString();
            }
            strId = strId.Replace(" ", "+");
            int intId = Convert.ToInt32(UtilityClass.Decrypt(strId));

            if (strType == "cus")
            {
               bool boolAct = objService.ActivateCustomer(intId);
            }
            else if (strType == "ven")
            {
                bool boolAct = objService.ActivateVendor(intId);
            }
        }
예제 #18
0
 void LoadCategory()
 {
     ddlCategory.Items.Clear();
     objService = new ServeAtDoorstepService();
     DataTable dt1 = objService.SelectAllCategory();
     ListItem listItem = new ListItem();
     listItem.Text = "<Select Category>";
     listItem.Value = "0";
     ddlCategory.Items.Add(listItem);
     for (int i = 0; i < dt1.Rows.Count; i++)
     {
         listItem = new ListItem();
         listItem.Text = dt1.Rows[i]["CategoryName"].ToString();
         listItem.Value = dt1.Rows[i]["CategoryID"].ToString();
         ddlCategory.Items.Add(listItem);
     }
 }
예제 #19
0
        protected void btnPost_Click(object sender, EventArgs e)
        {
            #region .. VALIDATION ..

            int intError = 0;
            string strErrorMsg = "";
            if (txtQuoteTitle.Value.ToString() == "")
            {
                strErrorMsg += "&nbsp;&nbsp;<img src='image/error.jpg' height='40px' width='40px' />&nbsp;&nbsp;Quiry Title should not be empty. <br/>";
                intError++;
            }
            if (ddlCategory.SelectedIndex == 0)
            {
                strErrorMsg += "&nbsp;&nbsp;<img src='image/error.jpg' height='40px' width='40px' />&nbsp;&nbsp;Please Select Category. <br/>";
                intError++;
            }
            if (FileUpload1.PostedFile.ContentLength == 0 || Request.Form["fileName1"] == null)
            {
                strErrorMsg += "&nbsp;&nbsp;<img src='image/error.jpg' height='40px' width='40px' />&nbsp;&nbsp;Please Upload atleast one image. <br/>";
                intError++;
            }
            if (FileUpload1.PostedFile != null)
            {
                if (FileUpload1.PostedFile.ContentLength > (50 * 1024))
                {
                    strErrorMsg += "&nbsp;&nbsp;<img src='image/error.jpg' height='40px' width='40px' />&nbsp;&nbsp;" + FileUpload1.PostedFile.FileName + " Exceeds maximum limit 50 KB. <br/>";
                    intError++;
                }
            }
            if (FileUpload2.PostedFile != null)
            {
                if (FileUpload2.PostedFile.ContentLength > (50 * 1024))
                {
                    strErrorMsg += "&nbsp;&nbsp;<img src='image/error.jpg' height='40px' width='40px' />&nbsp;&nbsp;" + FileUpload2.PostedFile.FileName + " Exceeds maximum limit 50 KB. <br/>";
                    intError++;
                }
            }
            if (FileUpload3.PostedFile != null)
            {
                if (FileUpload3.PostedFile.ContentLength > (50 * 1024))
                {
                    strErrorMsg += "&nbsp;&nbsp;<img src='image/error.jpg' height='40px' width='40px' />&nbsp;&nbsp;" + FileUpload3.PostedFile.FileName + " Exceeds maximum limit 50 KB. <br/>";
                    intError++;
                }
            }
            if (FileUpload4.PostedFile != null)
            {
                if (FileUpload4.PostedFile.ContentLength > (50 * 1024))
                {
                    strErrorMsg += "&nbsp;&nbsp;<img src='image/error.jpg' height='40px' width='40px' />&nbsp;&nbsp;" + FileUpload4.PostedFile.FileName + " Exceeds maximum limit 50 KB. <br/>";
                    intError++;
                }
            }
            if (FileUpload5.PostedFile != null)
            {
                if (FileUpload5.PostedFile.ContentLength > (50 * 1024))
                {
                    strErrorMsg += "&nbsp;&nbsp;<img src='image/error.jpg' height='40px' width='40px' />&nbsp;&nbsp;" + FileUpload5.PostedFile.FileName + " Exceeds maximum limit 50 KB. <br/>";
                    intError++;
                }
            }

            if (FileUploadVid.PostedFile != null)
            {
                if (FileUploadVid.PostedFile.ContentLength > (500 * 1024))
                {
                    strErrorMsg += "&nbsp;&nbsp;<img src='image/error.jpg' height='40px' width='40px' />&nbsp;&nbsp;" + FileUploadVid.PostedFile.FileName + " Exceeds maximum limit 500 KB. <br/>";
                    intError++;
                }
            }
            #endregion

            if (intError == 0)
            {
                InquiryDetails objQuiry = new InquiryDetails();
                objQuiry.InquiryID = 0;
                objQuiry.InquiryTitle = txtQuoteTitle.Value.ToString();
                objQuiry.Description = txtQuoteDesc.Value.ToString();
                objQuiry.Keywords = "";// txtQuoteKey.Value.ToString();
                objQuiry.CategoryId = Convert.ToInt32(ddlCategory.Value.ToString());
                objQuiry.CustomerId = Convert.ToInt32(Session["LoginId"].ToString());
                objQuiry.CityId = 0;
                objQuiry.ImagePath = "";
                objQuiry.VideoPath = "";

                objService = new ServeAtDoorstepService();
                int intQuoId = objService.AddInquiryDetails(objQuiry);

                #region .. CREATE INQUIRY IMAGE ..

                string path = string.Empty;
                string strImgFinalPath = "";
                string finalPath = string.Empty;
                string filePath = string.Empty;
                int iLoginId = Convert.ToInt32(Session["LoginId"].ToString());
                string sFilename = "";
                if (FileUpload1.PostedFile != null)
                {
                    HttpPostedFile myFile = FileUpload1.PostedFile;
                    int nFileLen = myFile.ContentLength;
                    if (nFileLen != 0)
                    {
                        DirectoryInfo dirInfo = null;
                        fileSavePath = "/Data/IQU_" + iLoginId + "_" + intQuoId + "/Images/";
                        path = Server.MapPath("~" + fileSavePath);
                        if (!Directory.Exists(path))
                        {
                            dirInfo = Directory.CreateDirectory(path);
                        }
                        sFilename = System.IO.Path.GetFileName(myFile.FileName);
                        path = path + "/" + sFilename;
                        FileUpload1.PostedFile.SaveAs(path);

                        finalPath = Path.Combine(fileSavePath, sFilename);
                    }
                }
                strImgFinalPath = finalPath;

                if (FileUpload2.PostedFile != null)
                {
                    HttpPostedFile myFile = FileUpload2.PostedFile;
                    int nFileLen = myFile.ContentLength;
                    if (nFileLen != 0)
                    {
                        path = Server.MapPath("~" + fileSavePath);
                        sFilename = System.IO.Path.GetFileName(myFile.FileName);
                        path = path + "/" + sFilename;
                        FileUpload2.PostedFile.SaveAs(path);

                        finalPath = Path.Combine(fileSavePath, sFilename);

                        strImgFinalPath = strImgFinalPath + ":" + finalPath;
                    }
                }

                if (FileUpload3.PostedFile != null)
                {
                    HttpPostedFile myFile = FileUpload3.PostedFile;
                    int nFileLen = myFile.ContentLength;
                    if (nFileLen != 0)
                    {
                        path = Server.MapPath("~" + fileSavePath);
                        sFilename = System.IO.Path.GetFileName(myFile.FileName);
                        path = path + "/" + sFilename;
                        FileUpload3.PostedFile.SaveAs(path);

                        finalPath = Path.Combine(fileSavePath, sFilename);
                        strImgFinalPath = strImgFinalPath + ":" + finalPath;
                    }
                }

                if (FileUpload4.PostedFile != null)
                {
                    HttpPostedFile myFile = FileUpload4.PostedFile;
                    int nFileLen = myFile.ContentLength;
                    if (nFileLen != 0)
                    {
                        path = Server.MapPath("~" + fileSavePath);
                        sFilename = System.IO.Path.GetFileName(myFile.FileName);
                        path = path + "/" + sFilename;
                        FileUpload4.PostedFile.SaveAs(path);

                        finalPath = Path.Combine(fileSavePath, sFilename);
                        strImgFinalPath = strImgFinalPath + ":" + finalPath;
                    }
                }

                if (FileUpload5.PostedFile != null)
                {
                    HttpPostedFile myFile = FileUpload5.PostedFile;
                    int nFileLen = myFile.ContentLength;
                    if (nFileLen != 0)
                    {
                        path = Server.MapPath("~" + fileSavePath);
                        sFilename = System.IO.Path.GetFileName(myFile.FileName);
                        path = path + "/" + sFilename;
                        FileUpload5.PostedFile.SaveAs(path);

                        finalPath = Path.Combine(fileSavePath, sFilename);
                        strImgFinalPath = strImgFinalPath + ":" + finalPath;
                    }
                }

                sFilename = ""; finalPath = "";
                if (FileUploadVid.PostedFile != null)
                {
                    HttpPostedFile myFile = FileUploadVid.PostedFile;
                    int nFileLen = myFile.ContentLength;
                    if (nFileLen != 0)
                    {
                        DirectoryInfo dirInfo = null;
                        fileSavePath = "/Data/IQU_" + iLoginId + "_" + intQuoId + "/Video/";
                        path = Server.MapPath("~" + fileSavePath);
                        if (!Directory.Exists(path))
                        {
                            dirInfo = Directory.CreateDirectory(path);
                        }
                        sFilename = System.IO.Path.GetFileName(myFile.FileName);
                        path = path + "/" + sFilename;
                        FileUploadVid.PostedFile.SaveAs(path);

                        finalPath = Path.Combine(fileSavePath, sFilename);
                    }
                }
                string strVidFinalPath = finalPath;

                InquiryDetails objIQ = new InquiryDetails();
                objIQ.InquiryID = intQuoId;
                objIQ.ImagePath = strImgFinalPath;
                objIQ.VideoPath = strVidFinalPath;

                objService.UpdateInquiryImages(objIQ);

                #endregion

                #region .. GET CUSTOMER CITY AND ZIPCODE ..

                string strCusCity = "";
                string strCusZipcode = "";
                string strVACity = "";
                string strVAZipcode = "";
                DataTable dtCus = objService.GetCustomerById(Convert.ToInt32(Session["LoginId"].ToString()));
                if (dtCus.Rows.Count > 0)
                {
                    strCusCity = dtCus.Rows[0]["CityName"].ToString();
                    strCusZipcode = dtCus.Rows[0]["ZipCode"].ToString();
                }

                #endregion

                DataTable dt = objService.SelectVendorByCategory(objQuiry.CategoryId);
                if (dt.Rows.Count > 0)
                {
                    for (int intVen = 0; intVen < dt.Rows.Count; intVen++)
                    {
                        string sVenEmail = dt.Rows[intVen]["VendorEmail"].ToString();

                        #region .. GET VENDOR AREA ..
                        strVACity = "";
                        strVAZipcode = "";
                        DataTable dtVenArea = objService.SelectAreaByVendorId(Convert.ToInt32(dt.Rows[intVen]["VendorID"].ToString()));
                        if (dtVenArea.Rows.Count > 0)
                        {

                            for (int k = 0; k < dtVenArea.Rows.Count; k++)
                            {
                                strVACity = dtVenArea.Rows[k]["VACityName"].ToString();
                                strVAZipcode = dtVenArea.Rows[k]["VAZipcode"].ToString();

                                if (strVAZipcode == strCusZipcode)
                                {
                                    VendorMessageDetails objVenMsgDet = new VendorMessageDetails();
                                    objVenMsgDet.VendorMessageId = 0;
                                    objVenMsgDet.VendorId = Convert.ToInt32(dt.Rows[intVen]["VendorID"].ToString());
                                    objVenMsgDet.SendCustomerId = objQuiry.CustomerId;
                                    objVenMsgDet.QuiryId = intQuoId;
                                    objVenMsgDet.CategoryId = Convert.ToInt32(objQuiry.CategoryId);
                                    objVenMsgDet.MessageTitle = txtQuoteTitle.Value.ToString();
                                    objVenMsgDet.Description = txtQuoteDesc.Value.ToString();
                                    objVenMsgDet.Status = "0";

                                    int intVenMsg = objService.AddVendorMessage(objVenMsgDet);
                                }
                            }
                        }

                        #endregion

                    }
                }

                divErrorMessage.InnerHtml = "";
                divMessage.InnerHtml = "Your Inquiry posted sucessfully.";

                txtQuoteTitle.Value = "";
                txtQuoteDesc.Value = "";
                ddlCategory.SelectedIndex = 0;
            }
            else
            {
                divErrorMessage.InnerHtml = strErrorMsg;
            }
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            intVaidError = 0;
            if (!IsEmailValid(txtEmail.Text.ToString()))
            {
                intVaidError++;
                strErrorMessage += "<img src='image/warning.png' height='25px' width='25px' />&nbsp;&nbsp;E mail address is not valid.<br />";
            }
            MailCheck();
            if (intMailAvail == 0)
            {
                intVaidError++;
                strErrorMessage += "<img src='image/warning.png' height='25px' width='25px' />&nbsp;&nbsp;E mail address does not exists.<br />";
            }

            if (intVaidError == 0)
            {
                try
                {
                    string serverPath = ConfigurationManager.AppSettings["ApplicationPath"].ToString() + "/Login.aspx";
                    DataTable dtCV = null;
                    ServeAtDoorstepService obj = new ServeAtDoorstepService();
                    if (sType == "cus")
                        dtCV = obj.ForgotPasswordCus(txtEmail.Text.Trim());
                    else if (sType == "ven")
                        dtCV = obj.ForgotPasswordVen(txtEmail.Text.Trim());
                    string sLoginName = "";
                    string sLoginPassword = "";
                    if (dtCV.Rows.Count>0)
                    {
                        sLoginName = dtCV.Rows[0][""].ToString();
                        sLoginPassword = dtCV.Rows[0][""].ToString();
                    }

                    ServeAtDoorstepData.SendMailDetails objMail = new ServeAtDoorstepData.SendMailDetails();
                    objMail.MailID = txtEmail.Text.Trim();
                    objMail.MailSubject = "Serve At Doorstep Password request";
                    objMail.MailContent = "<html><body><form id='form1' runat='server'><div>" +
                    "Dear " + sLoginName + ",<br /><br />As you request, your username and password is given below:<br><br>" +
                    "<b>UserName : "******"<br>Password : "******"</b>" +
                    "<br /><br />Now you can login with Serve At Doorstep<br />" +
                    "<a href='" + serverPath + "' runat='server' >" + serverPath + "</a>" +
                    "<br /><br />All the best,<br />Serve At Doorstep.</div></form></body></html>";

                    obj.DoSendMail(objMail);

                    divMessage.InnerHtml = "Password sent to your " + txtEmail.Text + ".<br/><img src='image/Mail Reply.png' height='25px' width='25px' />&nbsp;Goto your inbox";
                    txtEmail.Text = "";
                }
                catch (SqlException sqlEx)
                {
                    divErrorMessage.InnerHtml = "<img src='image/warning.png' height='25px' width='25px' />&nbsp;" + sqlEx.Message.ToString();
                }
                catch (Exception ex)
                {
                    divErrorMessage.InnerHtml = "<img src='image/warning.png' height='25px' width='25px' />&nbsp;" + ex.Message.ToString();
                }
            }
            else
            {
                divErrorMessage.InnerHtml = strErrorMessage;
            }
        }
 void MailCheck()
 {
     objService = new ServeAtDoorstepService();
     DataTable dt = null;
     if (sType == "cus")
         dt = objService.AvailableCusMail(txtEmail.Text.ToString().Trim());
     else if (sType == "ven")
         dt = objService.AvailableVenMail(txtEmail.Text.ToString().Trim());
     if (dt.Rows.Count == 0)
     {
         intMailAvail = 0;
     }
     else
     {
         intMailAvail = 1;
     }
 }
예제 #22
0
        public void LoadService()
        {
            objService = new ServeAtDoorstepService();
            DataTable dtServ = objService.GetServiceById(intServiceID);

            if (dtServ.Rows.Count > 0)
            {
                intCatID = Convert.ToInt32(dtServ.Rows[0]["CategoryId"].ToString());
                lblServiceName.Text = dtServ.Rows[0]["ServiceName"].ToString();
                lblServiceType.Text = dtServ.Rows[0]["ServiceType"].ToString();
                lblBrandName.Text = dtServ.Rows[0]["BrandName"].ToString();
                lblBrandType.Text = dtServ.Rows[0]["BrandType"].ToString();
                lblCategoryName.Text = dtServ.Rows[0]["CategoryName"].ToString();
                lblDescription.Text = dtServ.Rows[0]["ServiceDescription"].ToString();
                lblPriceRange.Text ="From "+ dtServ.Rows[0]["PriceRangeFrom"].ToString() +" To "+ dtServ.Rows[0]["PriceRangeTo"].ToString();
            }
        }
        protected void btnRegister_Click(object sender, EventArgs e)
        {
            strErrorMessage = "";
            intVaidError = 0;
            CheckValidation();

            if (intVaidError == 0)
            {
                ServeAtDoorstepData.VendorDetails objVenDetails = new ServeAtDoorstepData.VendorDetails();
                objVenDetails.LoginName = txtLoginname.Value.ToString();
                objVenDetails.LoginPassword = txtPassword.Value.ToString();
                objVenDetails.VendorID = 0;
                objVenDetails.VendorName = txtVendorName.Value.ToString();
                objVenDetails.VendorAddress = txtAddress.Value.ToString();
                objVenDetails.VendorStreet = txtStreet.Value.ToString();
                objVenDetails.VendorCityId = Convert.ToInt32(ddlCity.SelectedItem.Value.ToString());
                objVenDetails.VendorStateId = Convert.ToInt32(ddlState.SelectedItem.Value.ToString());
                objVenDetails.VendorCountryId = Convert.ToInt32(ddlCountry.Value.ToString());
                objVenDetails.VendorEmail = txtEmail.Value.ToString();
                objVenDetails.VendorZipcode = txtZipcode.Value.ToString();
                objVenDetails.VendorMobile = txtMobileNo.Value.ToString();
                objVenDetails.VendorBusinessPhone = txtBusinessNo.Value.ToString();
                objVenDetails.CompanyName = txtCompanyName.Value.ToString();
                objVenDetails.OwnerName = txtOwnerName.Value.ToString();
                objVenDetails.ContactName = txtContactName.Value.ToString();
                objVenDetails.ContactNumber = txtContactNo.Value.ToString();
                objVenDetails.CategoryId = 0;// Convert.ToInt32(ddlCategory.Value.ToString());
                objVenDetails.CoverageArea = txtCoverageArea.Value.ToString();
                objVenDetails.WebsiteUrl = txtWebsiteUrl.Value.ToString();
                objVenDetails.GeoCode = "0";//.Value.ToString();
                objVenDetails.MemberShipId = Convert.ToInt32(ddlMembership.Value.ToString());
                objVenDetails.CreditCardNumber = txtCredCardNo.Value.ToString();
                objVenDetails.CreditCardType = txtCredCardType.Value.ToString();
                objVenDetails.CreditCardExpired = txtExpiredDate.Value.ToString();
                objVenDetails.CVCNumber = txtCVC.Value.ToString();

                objService = new ServeAtDoorstepService();
                int intVendId = objService.AddVendorRegister(objVenDetails);

                for(int intCnt=0;intCnt<chkCateList.Items.Count;intCnt++)
                {
                    if (chkCateList.Items[intCnt].Selected == true)
                    {
                        int iCatID = Convert.ToInt32(chkCateList.Items[intCnt].Value.ToString());

                        objService = new ServeAtDoorstepService();
                        DataTable dtServ = objService.SelectServiceByCatID(iCatID);

                        //if (dtServ.Rows.Count > 0)
                        {
                            //for (int intSer = 0; intSer < dtServ.Rows.Count; intSer++)
                            {
                                VendorServiceDetails objVSData = new VendorServiceDetails();
                                objVSData.VendorServiceId = 0;
                                objVSData.VendorId = intVendId;
                                objVSData.CategoryId = iCatID;
                                objVSData.ServiceId = 0;// Convert.ToInt32(dtServ.Rows[0]["ServiceID"].ToString());
                                objVSData.Status = "1";

                                int i = objService.AddVendorService(objVSData);

                            }
                        }
                    }
                }

                #region .. VENDOR COVERAGE AREA ..

                //var requestUri = "https://www.zipwise.com/webservices/radius.php?key=yj7b6stzbr3lmmoo&zip=" + txtZipcode.Value.Trim() + "&radius=5&format=xml";
                //var requestUri = "https://zipcodedistanceapi.redline13.com/rest/VGO5Fus2poaNqECnpYc77kfZARW0TjgP04UFymHYLSMcxoAWnM3u6itHaqH4KXTK/radius.xml/" + txtZipcode.Value.Trim() + "/15/mile";
                var requestUri = "https://zipcodedistanceapi.redline13.com/rest/dtMOhbP1itLs2K2WQNccHRkUoEGJfDds7Zgoa6ptAbWCWYzMMLYuDjo1Y4LdIYGP/radius.xml/" + txtZipcode.Value.Trim() + "/15/mile";

                var webRequest = (HttpWebRequest)WebRequest.Create(requestUri);

                webRequest.Method = "GET";

                webRequest.ContentType = "application/xml";

                HttpWebResponse response;

                string responseContent = "";

                try
                {

                    response = (HttpWebResponse)webRequest.GetResponse();

                    XmlDocument xmlDoc = new XmlDocument();
                    xmlDoc.Load(response.GetResponseStream());

                    //Create namespace manager
                    int intAreaCount = 0;
                    string[] sCity = new string[500];
                    string[] state = new string[500];
                    string[] sZip = new string[500];
                    string[] sDis = new string[500];

                    XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlDoc.NameTable);
                    nsmgr.AddNamespace("rest", "http://schemas.microsoft.com/search/local/ws/rest/v1");
                    string s = xmlDoc.InnerXml.Contains("error").ToString();
                    if (xmlDoc.InnerXml.Contains("error").ToString() == "False")
                    {
                        XmlNodeList locationElements = xmlDoc.SelectNodes("results/result", nsmgr);
                        int i = 0;
                        foreach (XmlNode location in locationElements)
                        {
                            sZip[i] = location.SelectSingleNode("zip", nsmgr).InnerText;
                            //sCity[i] = location.SelectSingleNode("city", nsmgr).InnerText;
                            //state[i] = location.SelectSingleNode("state", nsmgr).InnerText;
                            //sDis[i] = location.SelectSingleNode("distance", nsmgr).InnerText;

                            i++;
                            intAreaCount++;
                        }
                    }
                    webRequest.Abort();

                    for (int iACnt = 0; iACnt < intAreaCount; iACnt++)
                    {
                        ServeAtDoorstepData.VendorAreaDetails objVendorArea = new VendorAreaDetails();
                        objVendorArea.VendorAreaID = 0;
                        objVendorArea.VendorId = intVendId;
                        objVendorArea.VAZipcode = sZip[iACnt];
                        objVendorArea.VACityName = "";// sCity[iACnt];
                        objVendorArea.VAState = "";//state[iACnt];
                        objVendorArea.VADistance = "";//sDis[iACnt];

                        int j = objService.AddVendorArea(objVendorArea);

                    }
                }
                catch (WebException webex)
                {
                    //lblResult.Text = "INVALID ZIPCODE";

                }

                #endregion

                SendMailtoUser(intVendId);

                lblEmailId.Text = txtEmail.Value.ToString();
                this.ModalPopupSuccess.Show();
                //Response.Redirect("Success.aspx?type=ven");
            }
            else
            {
                divErrorMessage.InnerHtml = strErrorMessage;

            }
        }
예제 #24
0
        protected void btnCusLogin_Click(object sender, EventArgs e)
        {
            int intErr = 0;
            LoginDetails objLogDetails = new LoginDetails();
            objLogDetails.UserName = txtCUsername.Value.ToString();
            objLogDetails.UserPassword = txtCUserpassword.Value.ToString();

            //if (Request.Form["rdoLogType"] != null)
            //    sType = Request.Form["rdoLogType"].ToString();
            //else
            if (txtCUsername.Value.ToString().ToLower() == "admin")
                sType = "3";
            else
                sType = "1";
            try
            {
                //if (Request.Form["rdoLogType"] == null && txtCUsername.Value.ToString().ToLower() != "admin")
                //{
                //    intErr = 1;
                //    divCusErrMsg.InnerText = "Please Select Login type.";
                //    divCusErrMsg.Visible = true;
                //}
                //else
                {
                    int intLogId = 0;
                    ServeAtDoorstepService objService = new ServeAtDoorstepService();
                    if (sType == "1")
                        intLogId = objService.LoginCustomer(objLogDetails);
                    if (sType == "2")
                        intLogId = objService.LoginVendor(objLogDetails);
                    if (sType == "3")
                        intLogId = objService.LoginAdmin(objLogDetails);

                    if (string.IsNullOrEmpty(intLogId.ToString().Trim()))
                    {
                        intErr = 1;
                        divCusErrMsg.InnerText = "Invalid Loginname and Password! Please try again.";
                        divCusErrMsg.Visible = true;
                    }
                    else
                    {
                        Session.Abandon();
                        Session.RemoveAll();

                        Session.Add("LoginId", intLogId.ToString());
                        Session.Add("LoginType", sType);
                        HttpCookie cLoginId = new HttpCookie("LoginId", intLogId.ToString().Trim());
                        HttpCookie cLoginType = new HttpCookie("LoginType", sType);
                        cLoginId.Expires = DateTime.Now.AddDays(5);
                        cLoginType.Expires = DateTime.Now.AddDays(5);

                        Response.Cookies.Add(cLoginId);
                        Response.Cookies.Add(cLoginType);

                        if (chkCusAgree.Checked == true)
                        {
                            HttpCookie cLoginName = new HttpCookie("LoginName", txtCUsername.Value.ToString().Trim());
                            HttpCookie cPassword = new HttpCookie("Password", txtCUserpassword.Value.ToString().Trim());
                            cLoginName.Expires = DateTime.Now.AddDays(5);
                            cPassword.Expires = DateTime.Now.AddDays(5);

                            Response.Cookies.Add(cLoginName);
                            Response.Cookies.Add(cPassword);
                        }
                    }
                }
            }
            catch (System.Threading.ThreadAbortException)
            {
            }
            catch (Exception ex)
            {
                divCusErrMsg.InnerText = ex.Message.ToString();
                intErr = 1;
            }

            if (intErr == 0 && Session["LoginType"].ToString() == "1")
                Response.Redirect("MyCustomerDash.aspx");
            else if (intErr == 0 && Session["LoginType"].ToString() == "2")
                Response.Redirect("MyVendorDash.aspx");
            else if (intErr == 0 && Session["LoginType"].ToString() == "3")
                Response.Redirect("MyAdminDash.aspx");
        }
예제 #25
0
        void LoadCustomerMessage()
        {
            objService = new ServeAtDoorstepService();
            if (sLoginType == "1")
                dt = objService.SelectMessageByCustomerId(Convert.ToInt32(sLoginId));

            if (dt.Rows.Count > 0)
            {
            }
            else
            {
            }
            gvCustomerMessage.DataSource = dt;
            gvCustomerMessage.DataBind();
        }
예제 #26
0
        void LoadVendorRespondMsg()
        {
            objService = new ServeAtDoorstepService();
            if (sLoginType == "2")
                dtRespond = objService.SelectResMsgByVenId(Convert.ToInt32(sLoginId));

            if (dtRespond.Rows.Count > 0)
            {
            }
            else
            {
            }
            gvRespondMsg.DataSource = dtRespond.DefaultView;
            gvRespondMsg.DataBind();
        }
예제 #27
0
        void LoadCustomerQuiry()
        {
            objService = new ServeAtDoorstepService();
            if (sLoginType == "1")
                dtQuote = objService.SelectInquiryByCustomerId(Convert.ToInt32(sLoginId));

            if (dtQuote.Rows.Count > 0)
            {
            }
            else
            {
            }
            gvQuiry.DataSource = dtQuote.DefaultView;
            gvQuiry.DataBind();
        }
        void LoadInquiry(int intQuiryID)
        {
            string strCusImagePath = "";

            ServeAtDoorstepService objService = new ServeAtDoorstepService();
            DataTable dtQuiry = objService.GetInquiryById(intQuiryID);
            if (dtQuiry.Rows.Count > 0)
            {
                lblTitle.Text = dtQuiry.Rows[0]["InquiryTitle"].ToString();
                lblDesc.Text = dtQuiry.Rows[0]["Description"].ToString();
                lblCatgory.Text = dtQuiry.Rows[0]["CategoryName"].ToString();
                strImagePath = dtQuiry.Rows[0]["ImagePath"].ToString().Split(':');
                strCusImagePath = dtQuiry.Rows[0]["CustomerImagePath"].ToString();
                strVideoPath = dtQuiry.Rows[0]["VideoPath"].ToString();
                lblAddress.Text = dtQuiry.Rows[0]["Address"].ToString() + " " + dtQuiry.Rows[0]["StreetName"].ToString();
                lblCustomerName.Text = dtQuiry.Rows[0]["CustomerName"].ToString();
                lblCity.Text = dtQuiry.Rows[0]["CustomerCity"].ToString();
                lblState.Text = dtQuiry.Rows[0]["CustomerState"].ToString() + " " + dtQuiry.Rows[0]["ZipCode"].ToString();
                strCreatedOn = dtQuiry.Rows[0]["CreatedOn"].ToString();
            }

            spnCusImage.InnerHtml = "<a class='example-image-link' href='" + strCusImagePath + "' data-lightbox='example-1'" +
                                    "title='Or press the right arrow on your keyboard.'>" +
                                    "<img class='example-image' src='" + strCusImagePath + "' alt='Plants: image 2 0f 4 thumb' width='150' height='150' /></a>";

            lblPostedOn.Text = strCreatedOn;
            string strDivQImg = "";
            string strJSImg = "<div id='sliderFrame'><div id='slider'>";

            for (int i = 0; i < strImagePath.Length; i++)
            {
                strDivQImg += "<a class='example-image-link' href='"+strImagePath[i]+"' data-lightbox='example-set'"+
                                    "title='Or press the right arrow on your keyboard.'>"+
                                    "<img class='example-image' src='"+strImagePath[i]+"' alt='Plants: image 2 0f 4 thumb' width='100' height='100' /></a>";
                strJSImg += "<img src='" + strImagePath[i] + "' />";
            }
            strJSImg += "</DIV></DIV>";
            //spnImgSlide.InnerHtml = strJSImg;
            divQuiryImag.InnerHtml = strDivQImg;
            spnVideo.InnerHtml = BindUrl(strVideoPath);
        }
예제 #29
0
        protected void lnbtnNewMsgView_Click(object sender, EventArgs e)
        {
            LinkButton btndetails = sender as LinkButton;
            GridViewRow gvrow = (GridViewRow)btndetails.NamingContainer;
            string sID = gvCustomerMessage.DataKeys[gvrow.RowIndex].Value.ToString();

            ServeAtDoorstepService objService = new ServeAtDoorstepService();
            DataTable dtMsg = objService.SelectCusMessageById(Convert.ToInt32(sID));

            if (dtMsg.Rows.Count > 0)
            {
                hdnCategoryId.Value = dtMsg.Rows[0]["CategoryId"].ToString();
                hdnCustomerId.Value = dtMsg.Rows[0]["CustomerId"].ToString();
                hdnQuoteId.Value = dtMsg.Rows[0]["QuiryId"].ToString();
                hdnVendorId.Value = dtMsg.Rows[0]["VendorID"].ToString();
                txtReplySubject.Text = "Re: " + dtMsg.Rows[0]["MessageTitle"].ToString();
                lblSubject.Text = dtMsg.Rows[0]["MessageTitle"].ToString();
                lblDescription.Text = dtMsg.Rows[0]["Description"].ToString();
                lblCreatedOn.Text = dtMsg.Rows[0]["CreatedOn"].ToString();
                lblVendor.Text = dtMsg.Rows[0]["VendorName"].ToString();
                lblCategory.Text = dtMsg.Rows[0]["CategoryName"].ToString();

            }

            this.ModalPopupReply.Show();
        }
예제 #30
0
        public void LoadVendorDiv()
        {
            objService = new ServeAtDoorstepService();
            DataTable dtVendor = objService.SelectVendorByService(intServiceID);
            int intCityCount = 0;
            string[] strVendorCity = new string[dtVendor.Rows.Count];
            string strDivVendor = "";
            if (dtVendor.Rows.Count > 0)
            {
                for(int i=0;i<dtVendor.Rows.Count;i++)
                {
                    strVendorCity[i] = dtVendor.Rows[i]["VendorCity"].ToString();
                }
            }

            int intTotalCount = 0;
            for (int i = 0;( i < strVendorCity.Length && intTotalCount < strVendorCity.Length); i++)
            {
                intCityCount=0;
                int Available = 0;
                for (int j = i; j < strVendorCity.Length; j++)
                {
                    for (int k = 0; k < i; k++)
                    {
                        if (strVendorCity[i] == strVendorCity[k])
                            Available = 1;
                    }

                    if (Available == 1) break;
                    if (strVendorCity[i] == strVendorCity[j] )
                    {
                        intTotalCount++;
                        intCityCount++;
                    }
                }

                if (Available == 0)
                {
                    strDivVendor += "<img src='image/locationg.png' height='40px' width='40px' />&nbsp;&nbsp;" +
                                         strVendorCity[i] + "(&nbsp;<span style='color:blue;'><strong>" + intCityCount.ToString() + "</span></strong>&nbsp;)<br/>";
                }
            }

            divVendor.InnerHtml = strDivVendor;
            if (dtVendor.Rows.Count == 0)
                divVendor.InnerHtml = "No Vendors";
        }