private void FillOneRecord() { OneRecord aco = new OneRecord(); OneRecordDatum dmo = new OneRecordDatum(); DataTable dt; dmo.Type = "Print1"; dt = aco.SelectOne(dmo); if (dt.Rows.Count > 0) { Label1.Text = dt.Rows[0]["text"].ToString(); } dmo.Type = "Print2"; dt = aco.SelectOne(dmo); if (dt.Rows.Count > 0) { Label2.Text = dt.Rows[0]["text"].ToString(); } int maliat = 0; dmo.Type = "Maliat"; dt = aco.SelectOne(dmo); if (dt.Rows.Count > 0) { maliat = int.Parse(dt.Rows[0]["text"].ToString()); } Label33.Text = maliat.ToString() + "% مالیات :"; }
private void Fill() { DataTable dt; dm.Type = "Shoping1"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox1.Text = dt.Rows[0]["title"].ToString(); FCKeditor1.Value = dt.Rows[0]["text"].ToString(); } dm.Type = "Shoping2"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox2.Text = dt.Rows[0]["title"].ToString(); FCKeditor2.Value = dt.Rows[0]["text"].ToString(); } dm.Type = "Shoping3"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox3.Text = dt.Rows[0]["title"].ToString(); FCKeditor3.Value = dt.Rows[0]["text"].ToString(); } dm.Type = "Shoping4"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox4.Text = dt.Rows[0]["title"].ToString(); FCKeditor4.Value = dt.Rows[0]["text"].ToString(); } }
void Calcuate() { Label sum; decimal Price; decimal Tasx = 0; int Count; decimal Sum_Price; decimal All_Sum_Price = 0; for (int i = 0; i < GridView1.Rows.Count; i++) { sum = (Label)(GridView1.Rows[i].FindControl("Label14")); Price = decimal.Parse(((Label)(GridView1.Rows[i].FindControl("Label10"))).Text); Count = int.Parse(((DropDownList)(GridView1.Rows[i].FindControl("DropDownList1"))).SelectedValue); Sum_Price = Price * Count; All_Sum_Price = All_Sum_Price + Sum_Price; sum.Text = BLL.PublicClass.numberToMoney(Sum_Price.ToString()); } Label15.Text = BLL.PublicClass.numberToMoney(All_Sum_Price.ToString()); OneRecord ac = new OneRecord(); OneRecordDatum dm = new OneRecordDatum(); int maliat = 0; DataTable dt; dm.Type = "Maliat"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { maliat = int.Parse(dt.Rows[0]["text"].ToString()); } int HazineErsal = 0; dm.Type = "HazineErsal"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { Label19.Text = BLL.PublicClass.numberToMoney(dt.Rows[0]["text"].ToString()); HazineErsal = int.Parse(dt.Rows[0]["text"].ToString()); } Label9.Text = maliat.ToString() + "% مالیات :"; Tasx = All_Sum_Price * maliat; Tasx = (int)(Tasx / 100); Label33.Text = BLL.PublicClass.numberToMoney(Tasx.ToString()); if (Label33.Text == "0") { lblTasx.Visible = false; } Label22.Text = BLL.PublicClass.numberToMoney((All_Sum_Price + HazineErsal + Tasx).ToString()); }
protected void Button1_Click(object sender, EventArgs e) { Email_Sender mail = new Email_Sender(); try { OneRecord aco = new OneRecord(); OneRecordDatum dmo = new OneRecordDatum(); DataTable dt; dmo.Type = "EmailSendFactor"; dt = aco.SelectOne(dmo); string title = dt.Rows[0]["title"].ToString(); string text = dt.Rows[0]["text"].ToString(); text = text.Replace("LinkFactor", "<a target='_blank' href='" + Request.RawUrl + "'>برای مشاهده فاکتور اینجا کلیک کنید </a>"); text = text.Replace("TextUser", TextBox3.Text); mail.Subject = title; mail.Body = text; dmo.Type = "EmailDisplay_Name"; dt = aco.SelectOne(dmo); mail.Display_Name = dt.Rows[0]["text"].ToString(); // "MMG SOFT Sales"; mail.From_Email_Address = TextBox2.Text; // "*****@*****.**"; mail.To_Email_Address = TextBox1.Text; mail.Port_Number = 25;// 465; dmo.Type = "EmailSmtp_Host"; dt = aco.SelectOne(dmo); mail.Smtp_Host = dt.Rows[0]["text"].ToString();// "mail.mmg-soft.com"; dmo.Type = "EmailSender_Email_Address"; dt = aco.SelectOne(dmo); mail.Sender_Email_Address = dt.Rows[0]["text"].ToString();//"*****@*****.**"; dmo.Type = "EmailSender_Email_Pass"; dt = aco.SelectOne(dmo); mail.Sender_Email_Pass = dt.Rows[0]["text"].ToString();// "mmg-softkarafarin"; mail.Send_Email_By_Host(); Label4.Visible = true; } catch { } }
protected void Page_Load(object sender, EventArgs e) { if (Request.Cookies["Login_User"] != null) { if (!bool.Parse(Request.Cookies["Login_User"].Value)) { Response.Redirect("~/index.aspx?Type=404"); } } else { Response.Redirect("~/index.aspx?Type=404"); } if (!IsPostBack) { check_factor(); OneRecord ac = new OneRecord(); OneRecordDatum dm = new OneRecordDatum(); int maliat = 0; DataTable dt; dm.Type = "Maliat"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { maliat = int.Parse(dt.Rows[0]["text"].ToString()); } Label9.Text = maliat.ToString() + "% مالیات :"; } }
private void Fill() { OneRecord aco = new OneRecord(); OneRecordDatum dmo = new OneRecordDatum(); DataTable dt; dmo.Type = "AddressPrint"; dt = aco.SelectOne(dmo); if (dt.Rows.Count > 0) { Label1.Text = dt.Rows[0]["text"].ToString(); } BLL.user blu = new user(); Shoping ac = new Shoping(); ShopingDatum dm = new ShopingDatum(); string company, post_code; dm.Id_Factor = decimal.Parse(Request.QueryString["Id_Factor"].ToString()); DataTable dt2 = ac.select_factor_one(dm); DataTable dtuser = blu.select_one_user(new userDatum() { Id = int.Parse(dt2.Rows[0]["id_user"].ToString()) }); company = dtuser.Rows[0]["company"].ToString(); post_code = dtuser.Rows[0]["post_code"].ToString(); Label1.Text = Label1.Text.Replace("NameUser", dt2.Rows[0]["customer_name"].ToString()); Label1.Text = Label1.Text.Replace("TellphoneUser", dt2.Rows[0]["customer_tell"].ToString()); Label1.Text = Label1.Text.Replace("AddressUser", string.Format(" {0} <br/> کد پستی {1} <br/> نام شرکت {2}", dt2.Rows[0]["customer_address"].ToString(), company, post_code)); }
private void Fill() { DataTable dt; dm.Type = "EmailRegisterUser"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox1.Text = dt.Rows[0]["title"].ToString(); FCKeditor1.Value = dt.Rows[0]["text"].ToString(); } dm.Type = "EmailDisplay_Name"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox2.Text = dt.Rows[0]["text"].ToString(); } dm.Type = "EmailFrom_Email_Address"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox3.Text = dt.Rows[0]["text"].ToString(); } dm.Type = "EmailSmtp_Host"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox4.Text = dt.Rows[0]["text"].ToString(); } dm.Type = "EmailSender_Email_Address"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox5.Text = dt.Rows[0]["text"].ToString(); } dm.Type = "EmailSender_Email_Pass"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox6.Text = dt.Rows[0]["text"].ToString(); } dm.Type = "EmailSendFactor"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox7.Text = dt.Rows[0]["title"].ToString(); FCKeditor2.Value = dt.Rows[0]["text"].ToString(); } dm.Type = "EmailForgetPassword"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox8.Text = dt.Rows[0]["title"].ToString(); FCKeditor3.Value = dt.Rows[0]["text"].ToString(); } }
private void Fill() { dm.Type = "Amar"; DataTable dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox1.Checked = bool.Parse(dt.Rows[0]["title"].ToString()); TextTitle.Text = dt.Rows[0]["text"].ToString(); } }
private void FillOneRecord() { OneRecord aco = new OneRecord(); OneRecordDatum dmo = new OneRecordDatum(); DataTable dt; dmo.Type = "Shoping2"; dt = aco.SelectOne(dmo); if (dt.Rows.Count > 0) { Label4.Text = dt.Rows[0]["title"].ToString(); Label1.Text = dt.Rows[0]["text"].ToString(); } dmo.Type = "Shoping3"; dt = aco.SelectOne(dmo); if (dt.Rows.Count > 0) { Label5.Text = dt.Rows[0]["title"].ToString(); Label6.Text = dt.Rows[0]["text"].ToString(); } }
private void FillOneRecord() { OneRecord aco = new OneRecord(); OneRecordDatum dmo = new OneRecordDatum(); DataTable dt; dmo.Type = Request.QueryString["OR"]; dt = aco.SelectOne(dmo); if (dt.Rows.Count > 0) { Label2.Text = dt.Rows[0]["title"].ToString(); Label1.Text = dt.Rows[0]["text"].ToString(); SetMetaTags(Label2.Text); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { fill_factor(); OneRecord ac = new OneRecord(); OneRecordDatum dm = new OneRecordDatum(); int maliat = 0; DataTable dt; dm.Type = "Maliat"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { maliat = int.Parse(dt.Rows[0]["text"].ToString()); } Label9.Text = maliat.ToString() + "% مالیات :"; } }
private void FillOneRecord() { OneRecord aco = new OneRecord(); OneRecordDatum dmo = new OneRecordDatum(); DataTable dt; dmo.Type = "Amar"; dt = aco.SelectOne(dmo); if (dt.Rows.Count > 0) { if (bool.Parse(dt.Rows[0]["title"].ToString())) { Label3.Text = dt.Rows[0]["text"].ToString(); } else { Label3.Text = dt.Rows[0]["text"].ToString(); divTop.Visible = false; } } }
private void Fill() { DataTable dt; dm.Type = "Maliat"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox1.Text = dt.Rows[0]["text"].ToString(); } dm.Type = "MetaTagTitle"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox2.Text = dt.Rows[0]["text"].ToString(); } dm.Type = "MetaTagKeyword"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox3.Text = dt.Rows[0]["text"].ToString(); } dm.Type = "MetaTagDescription"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox4.Text = dt.Rows[0]["text"].ToString(); } dm.Type = "HazineErsal"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { TextBox5.Text = dt.Rows[0]["text"].ToString(); } dm.Type = "AddressPrint"; dt = ac.SelectOne(dm); if (dt.Rows.Count > 0) { FCKeditor1.Value = dt.Rows[0]["text"].ToString(); } Common.Setting iset = new Common.Setting(); iset = new BLL.Setting().Select(); txtGoogleSearch.Text = iset.google_search; }
//---------------------------------------------------------------------------------------------- protected void LinkButton1_Click(object sender, EventArgs e) { StreamWriter asw = new StreamWriter(Server.MapPath("~//administrator//files//Web.sitemap"), false, System.Text.Encoding.UTF8); asw.Write(""); asw.Close(); string p = ""; string title = ""; string desc = ""; int i = 0; OneRecord ac2 = new OneRecord(); OneRecordDatum dm2 = new OneRecordDatum(); DataTable dt2; dm2.Type = "MetaTagTitle"; dt2 = ac2.SelectOne(dm2); if (dt2.Rows.Count > 0) { title = dt2.Rows[0]["text"].ToString(); } dm2.Type = "MetaTagDescription"; dt2 = ac2.SelectOne(dm2); if (dt2.Rows.Count > 0) { desc = dt2.Rows[0]["text"].ToString(); } p += "<?xml version='1.0' encoding='utf-8' ?>" + "<siteMap xmlns='http://schemas.microsoft.com/AspNet/SiteMap-File-1.0' >"; p += "<siteMapNode url='~/index.aspx' title='" + title + "' description='" + desc + "' >"; //----------------- title = "ثبت نام سایت"; desc = "در این بخش می توانید با ثبت نام در سایت از امکانات بیشتری بهره مند گردید"; p += "<siteMapNode url='~/index.aspx?Type=UserRegister' title='" + title + "' description='" + desc + "' />"; title = "جستجو پیشرفته"; desc = "در این بخش می توانید با امکانات بیشتری به جستجوی محصول مورد نظر خود بپردازید"; p += "<siteMapNode url='~/index.aspx?Type=Search' title='" + title + "' description='" + desc + "' />"; title = "نقشه سایت"; desc = "در این بخش می توانید با نقشه سایت و امکانات سایت را دسته بندی شده مشاهده نمایید"; p += "<siteMapNode url='~/index.aspx?Type=SiteMap' title='" + title + "' description='" + desc + "' />"; //---------------- Page_Manage ac = new Page_Manage(); Page_ManageDatum dm = new Page_ManageDatum(); dm.Place = "Down"; DataTable dt = ac.Select_User(dm); for (i = 0; i < dt.Rows.Count; i++) { title = dt.Rows[i]["title"].ToString(); desc = dt.Rows[i]["MetaDescription"].ToString(); p += "<siteMapNode url='~/index.aspx?ID_Page=" + dt.Rows[i]["id"].ToString() + "' title='" + title + "' description='" + desc + "' />"; } //--------------- title = "آرشیو صفحات"; desc = "در این بخش می توانید با آرشیو صفحات ثبت شده را مشاهده نمایید"; p += "<siteMapNode url='~/index.aspx?Type=PageArchive' title='" + title + "' description='" + desc + "' >"; dm.Place = "Right"; dt = ac.Select_User(dm); for (i = 0; i < dt.Rows.Count; i++) { title = dt.Rows[i]["title"].ToString(); desc = dt.Rows[i]["MetaDescription"].ToString(); p += "<siteMapNode url='~/index.aspx?ID_Page=" + dt.Rows[i]["id"].ToString() + "' title='" + title + "' description='" + desc + "' />"; } p += "</siteMapNode>"; //--------------- Product_Grouping ac3 = new Product_Grouping(); Product_GroupingDatum dm3 = new Product_GroupingDatum(); dm3.Id = -1; int i2 = 0; int i3 = 0; int i4 = 0; int i5 = 0; int i6 = 0; DataTable dt3; DataTable dt4; DataTable dt5; DataTable dt6; DataTable dtp; Product acp = new Product(); ProductDatum dmp = new ProductDatum(); int j = 0; dt = ac3.SelectAll(dm3); for (i = 0; i < dt.Rows.Count; i++) { title = dt.Rows[i]["Title"].ToString(); desc = dt.Rows[i]["MetaDescription"].ToString(); p += "<siteMapNode url='~/index.aspx?ID_Root=" + dt.Rows[i]["id"].ToString() + "' title='" + title + "' description='" + desc + "' >"; dm3.Id = int.Parse(dt.Rows[i]["id"].ToString()); dt2 = ac3.SelectAll(dm3); for (i2 = 0; i2 < dt2.Rows.Count; i2++) { title = dt2.Rows[i2]["Title"].ToString(); desc = dt2.Rows[i2]["MetaDescription"].ToString(); p += "<siteMapNode url='~/index.aspx?ID_Root=" + dt2.Rows[i2]["id"].ToString() + "' title='" + title + "' description='" + desc + "' >"; dm3.Id = int.Parse(dt2.Rows[i2]["id"].ToString()); dt3 = ac3.SelectAll(dm3); for (i3 = 0; i3 < dt3.Rows.Count; i3++) { title = dt3.Rows[i3]["Title"].ToString(); desc = dt3.Rows[i3]["MetaDescription"].ToString(); p += "<siteMapNode url='~/index.aspx?ID_Root=" + dt3.Rows[i3]["id"].ToString() + "' title='" + title + "' description='" + desc + "' >"; dm3.Id = int.Parse(dt3.Rows[i3]["id"].ToString()); dt4 = ac3.SelectAll(dm3); for (i4 = 0; i4 < dt4.Rows.Count; i4++) { title = dt4.Rows[i4]["Title"].ToString(); desc = dt4.Rows[i4]["MetaDescription"].ToString(); p += "<siteMapNode url='~/index.aspx?ID_Root=" + dt4.Rows[i4]["id"].ToString() + "' title='" + title + "' description='" + desc + "' >"; dm3.Id = int.Parse(dt4.Rows[i4]["id"].ToString()); dt5 = ac3.SelectAll(dm3); for (i5 = 0; i5 < dt5.Rows.Count; i5++) { title = dt5.Rows[i5]["Title"].ToString(); desc = dt5.Rows[i5]["MetaDescription"].ToString(); p += "<siteMapNode url='~/index.aspx?ID_Root=" + dt5.Rows[i5]["id"].ToString() + "' title='" + title + "' description='" + desc + "' >"; dm3.Id = int.Parse(dt5.Rows[i5]["id"].ToString()); dt6 = ac3.SelectAll(dm3); for (i6 = 0; i6 < dt6.Rows.Count; i6++) { title = dt6.Rows[i6]["Title"].ToString(); desc = dt6.Rows[i6]["MetaDescription"].ToString(); p += "<siteMapNode url='~/index.aspx?ID_Root=" + dt6.Rows[i6]["id"].ToString() + "' title='" + title + "' description='" + desc + "' >"; dmp.Id_Group = int.Parse(dt6.Rows[i6]["id"].ToString()); dtp = acp.Select_Product_Group_Node_SiteMap(dmp); for (j = 0; j < dtp.Rows.Count; j++) { title = dtp.Rows[j]["Title"].ToString(); desc = dtp.Rows[j]["MetaDescription"].ToString(); p += "<siteMapNode url='~/index.aspx?ID_Product=" + dtp.Rows[j]["id"].ToString() + "' title='" + title + "' description='" + desc + "' />"; } p += "</siteMapNode>"; } dmp.Id_Group = int.Parse(dt5.Rows[i5]["id"].ToString()); dtp = acp.Select_Product_Group_Node_SiteMap(dmp); for (j = 0; j < dtp.Rows.Count; j++) { title = dtp.Rows[j]["Title"].ToString(); desc = dtp.Rows[j]["MetaDescription"].ToString(); p += "<siteMapNode url='~/index.aspx?ID_Product=" + dtp.Rows[j]["id"].ToString() + "' title='" + title + "' description='" + desc + "' />"; } p += "</siteMapNode>"; } dmp.Id_Group = int.Parse(dt4.Rows[i4]["id"].ToString()); dtp = acp.Select_Product_Group_Node_SiteMap(dmp); for (j = 0; j < dtp.Rows.Count; j++) { title = dtp.Rows[j]["Title"].ToString(); desc = dtp.Rows[j]["MetaDescription"].ToString(); p += "<siteMapNode url='~/index.aspx?ID_Product=" + dtp.Rows[j]["id"].ToString() + "' title='" + title + "' description='" + desc + "' />"; } p += "</siteMapNode>"; } dmp.Id_Group = int.Parse(dt3.Rows[i3]["id"].ToString()); dtp = acp.Select_Product_Group_Node_SiteMap(dmp); for (j = 0; j < dtp.Rows.Count; j++) { title = dtp.Rows[j]["Title"].ToString(); desc = dtp.Rows[j]["MetaDescription"].ToString(); p += "<siteMapNode url='~/index.aspx?ID_Product=" + dtp.Rows[j]["id"].ToString() + "' title='" + title + "' description='" + desc + "' />"; } p += "</siteMapNode>"; } dmp.Id_Group = int.Parse(dt2.Rows[i2]["id"].ToString()); dtp = acp.Select_Product_Group_Node_SiteMap(dmp); for (j = 0; j < dtp.Rows.Count; j++) { title = dtp.Rows[j]["Title"].ToString(); desc = dtp.Rows[j]["MetaDescription"].ToString(); p += "<siteMapNode url='~/index.aspx?ID_Product=" + dtp.Rows[j]["id"].ToString() + "' title='" + title + "' description='" + desc + "' />"; } p += "</siteMapNode>"; } dmp.Id_Group = int.Parse(dt.Rows[i]["id"].ToString()); dtp = acp.Select_Product_Group_Node_SiteMap(dmp); for (j = 0; j < dtp.Rows.Count; j++) { title = dtp.Rows[j]["Title"].ToString(); desc = dtp.Rows[j]["MetaDescription"].ToString(); p += "<siteMapNode url='~/index.aspx?ID_Product=" + dtp.Rows[j]["id"].ToString() + "' title='" + title + "' description='" + desc + "' />"; } p += "</siteMapNode>"; } //--------------- p += "</siteMapNode></siteMap>"; File.AppendAllText(Server.MapPath("~//administrator//files//Web.sitemap"), p, System.Text.Encoding.UTF8); Response.Redirect("index.aspx"); }
protected void Button1_Click(object sender, EventArgs e) { Email_Sender mail = new Email_Sender(); dm.Email = TextBox1.Text.ToString(); string pass = ac.GetUserPass(dm).Rows.Count.ToString(); Button1.Enabled = false; Button2.Enabled = false; Label11.Visible = false; if (pass == "0") { Label11.Text = "ایمیل مورد نظر در فروشگاه ثبت نشده است.لطفا ایمیل را صحیح وارد کنید."; Label11.Visible = true; Button1.Enabled = true; Button2.Enabled = true; } else { try { OneRecord aco = new OneRecord(); OneRecordDatum dmo = new OneRecordDatum(); DataTable dt; dmo.Type = "EmailForgetPassword"; dt = aco.SelectOne(dmo); if (dt.Rows.Count > 0) { string title = dt.Rows[0]["title"].ToString(); string text = dt.Rows[0]["text"].ToString(); text = text.Replace("username", TextBox2.Text.ToString()); text = text.Replace("password", pass); mail.Subject = title; mail.Body = text; dmo.Type = "EmailDisplay_Name"; dt = aco.SelectOne(dmo); mail.Display_Name = dt.Rows[0]["text"].ToString();// "MMG SOFT Sales"; dmo.Type = "EmailFrom_Email_Address"; dt = aco.SelectOne(dmo); mail.From_Email_Address = dt.Rows[0]["text"].ToString();// "*****@*****.**"; mail.To_Email_Address = TextBox2.Text; mail.Port_Number = 25;// 465; dmo.Type = "EmailSmtp_Host"; dt = aco.SelectOne(dmo); mail.Smtp_Host = dt.Rows[0]["text"].ToString();// "mail.mmg-soft.com"; dmo.Type = "EmailSender_Email_Address"; dt = aco.SelectOne(dmo); mail.Sender_Email_Address = dt.Rows[0]["text"].ToString();//"*****@*****.**"; dmo.Type = "EmailSender_Email_Pass"; dt = aco.SelectOne(dmo); mail.Sender_Email_Pass = dt.Rows[0]["text"].ToString();// "mmg-softkarafarin"; mail.Port_Number = 25;// 465; mail.Send_Email_By_Host(); Label11.Text = "هم اکنون ایمیلی حاوی رمز عبور، برایتان ارسال شده است."; Label11.Visible = true; Button1.Enabled = true; Button2.Enabled = true; } } catch { Label11.Text = "ارسال رمز عبور با خطا مواجه شده است , لطفا دوباره تلاش کنید."; Label11.Visible = true; Button1.Enabled = true; Button2.Enabled = true; } } }
private void FillMeta() { Product_Grouping acg = new Product_Grouping(); Product_GroupingDatum dmg = new Product_GroupingDatum(); bool Home = false; if (Request.QueryString["ID_Root"] != null) { if (Request.QueryString["ID_Root"] != "-1") { dmg.Id = decimal.Parse(Request.QueryString["ID_Root"]); DataTable dt = acg.SelectOne(dmg); if (dt.Rows.Count > 0) { SetMetaTags("گروه " + dt.Rows[0]["title"].ToString(), dt.Rows[0]["MetaDescription"].ToString(), dt.Rows[0]["MetaKeyword"].ToString()); } else { Home = true; } } else { Home = true; } } else { Home = true; } if (Home) { OneRecord ac2 = new OneRecord(); OneRecordDatum dm2 = new OneRecordDatum(); string title = "فروشگاه اینترنتی فراجهش شمال"; string key = ""; string desc = ""; DataTable dt2; dm2.Type = "MetaTagTitle"; dt2 = ac2.SelectOne(dm2); if (dt2.Rows.Count > 0) { title = dt2.Rows[0]["text"].ToString(); } dm2.Type = "MetaTagKeyword"; dt2 = ac2.SelectOne(dm2); if (dt2.Rows.Count > 0) { key = dt2.Rows[0]["text"].ToString(); } dm2.Type = "MetaTagDescription"; dt2 = ac2.SelectOne(dm2); if (dt2.Rows.Count > 0) { desc = dt2.Rows[0]["text"].ToString(); } SetMetaTags(title, desc, key); } }
protected void Button1_Click(object sender, EventArgs e) { Email_Sender mail = new Email_Sender(); dm.Email = TextBox1.Text; if (ac.CheckUserExist(dm)) { Label18.Visible = true; } else { dm.Name = TextBox4.Text; dm.Family = TextBox5.Text; dm.Tell = TextBox6.Text; dm.Mobile = TextBox7.Text; dm.Post_Code = TextBox8.Text; dm.Country = TextBox9.Text; dm.Province = DropDownList1.Text; dm.City = TextBox10.Text; dm.Address = TextBox11.Text; dm.How_Find = DropDownList2.Text; dm.Recive_News = CheckBox1.Checked.ToString(); dm.Pass = TextBox2.Text; dm.Company = TextBox12.Text; Response.Cookies.Add(new HttpCookie("Id_User", ac.Insert(dm).ToString())); //<ارسال پیام خوشامد گویی برای کاربرهایی که جدید ثبت نام کرده اند> try { OneRecord aco = new OneRecord(); OneRecordDatum dmo = new OneRecordDatum(); DataTable dt; dmo.Type = "EmailRegisterUser"; dt = aco.SelectOne(dmo); if (dt.Rows.Count > 0) { string title = dt.Rows[0]["title"].ToString(); string text = dt.Rows[0]["text"].ToString(); text = text.Replace("username", TextBox1.Text.ToString()); text = text.Replace("name", TextBox4.Text.ToString() + " " + TextBox5.Text.ToString()); text = text.Replace("password", TextBox2.Text.ToString()); mail.Subject = title; mail.Body = text; dmo.Type = "EmailDisplay_Name"; dt = aco.SelectOne(dmo); mail.Display_Name = dt.Rows[0]["text"].ToString();// "MMG SOFT Sales"; dmo.Type = "EmailFrom_Email_Address"; dt = aco.SelectOne(dmo); mail.From_Email_Address = dt.Rows[0]["text"].ToString();// "*****@*****.**"; mail.To_Email_Address = TextBox1.Text; mail.Port_Number = 25;// 465; dmo.Type = "EmailSmtp_Host"; dt = aco.SelectOne(dmo); mail.Smtp_Host = dt.Rows[0]["text"].ToString();// "mail.mmg-soft.com"; dmo.Type = "EmailSender_Email_Address"; dt = aco.SelectOne(dmo); mail.Sender_Email_Address = dt.Rows[0]["text"].ToString();//"*****@*****.**"; dmo.Type = "EmailSender_Email_Pass"; dt = aco.SelectOne(dmo); mail.Sender_Email_Pass = dt.Rows[0]["text"].ToString();// "mmg-softkarafarin"; mail.Send_Email_By_Host(); } } catch { } Response.Cookies.Add(new HttpCookie("Family_User", TextBox4.Text + " " + TextBox5.Text)); Response.Cookies.Add(new HttpCookie("Email_User", TextBox1.Text)); Response.Cookies.Add(new HttpCookie("Login_User", "True")); if (Request.QueryString["Kind"] == null) { Response.Redirect("~/index.aspx?Type=UserRegisterOK"); } else { Response.Redirect("~/index.aspx?Type=ShopFactorRegister"); } } }