/// <summary> /// 为表格中字段加控制 /// </summary> public void dgListState() { //this.dgList.Columns[3].Visible = this.CanSelect; //this.dgList.Columns[4].Visible = !this.CanSelect; if (!this.CanModify) { foreach (DataGridItem dg in dgList.Items) { //将允许出现的列定义为不可用 for (int i = 1; i <= DiscussNumber; i++) { string id = "TxtReturn" + System.Convert.ToString(i); System.Web.UI.HtmlControls.HtmlInputText txtreturn = dg.FindControl(id) as System.Web.UI.HtmlControls.HtmlInputText; txtreturn.Disabled = true; } dg.Cells[8].Visible = false; } } //隐藏不允许出现的列 foreach (DataGridColumn dg in dgList.Columns) { for (int i = 3; i > DiscussNumber; i--) { this.dgList.Columns[4 + i].Visible = false; } } }
protected override void AttachChildControls() { System.Web.UI.HtmlControls.HtmlInputText control = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtUserName"); System.Web.UI.HtmlControls.HtmlInputText control2 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtRealName"); System.Web.UI.HtmlControls.HtmlInputText control3 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtPhone"); System.Web.UI.HtmlControls.HtmlInputText control4 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtIdentityCard"); Member member = HiContext.Current.User as Member; if (member != null) { DataTable dt = SitesManagementHelper.GetMySubMemberByUserId(member.UserId); control.SetWhenIsNotNull(member.Username); if (dt != null && dt.Rows.Count > 0) { control2.Value = dt.Rows[0]["RealName"].ToString(); control3.Value = dt.Rows[0]["CellPhone"].ToString(); control4.Value = dt.Rows[0]["IdentityCard"].ToString(); } else { control2.Value = member.RealName; control3.Value = member.CellPhone; control4.Value = member.IdentityCard; } } PageTitle.AddSiteNameTitle("修改个人信息"); }
/// <summary> /// Renders out field with honeypot security check enabled /// </summary> /// <param name="helper">HtmlHelper which will be extended</param> /// <param name="name">Name of field. Should match model field of string type</param> /// <param name="value">Value of the field</param> /// <param name="css">CSS class to be applied to input field</param> /// <returns>Returns render out MvcHtmlString for displaying on the View</returns> public static MvcHtmlString HoneyPotField(this HtmlHelper helper, string name, object value, string inputCss = null, InputType fieldType=InputType.Text,string honeypotCss = null, InputType honeypotType=InputType.Hidden) { StringBuilder sbControlHtml = new StringBuilder(); using (StringWriter stringWriter = new StringWriter()) { using (HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter)) { HtmlInputText hashedField = new HtmlInputText(fieldType.ToString().ToLower()); string hashedName = GetHashedPropertyName(name); hashedField.Value = value != null ? value.ToString() : string.Empty; hashedField.ID = hashedName; hashedField.Name = hashedName; if (!string.IsNullOrWhiteSpace(inputCss)) { hashedField.Attributes["class"] = inputCss; } hashedField.RenderControl(htmlWriter); HtmlInputText hiddenField = new HtmlInputText(honeypotType.ToString().ToLower()); hiddenField.Value = string.Empty; hiddenField.ID = name; hiddenField.Name = name; if (!string.IsNullOrWhiteSpace(honeypotCss)) { hiddenField.Attributes["class"] = honeypotCss; } hiddenField.RenderControl(htmlWriter); sbControlHtml.Append(stringWriter.ToString()); } } return new MvcHtmlString(sbControlHtml.ToString()); }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId)) { base.GotoResourceNotFound(); } this.txtEmail = (TextBox) this.FindControl("txtEmail"); this.txtUserName = (TextBox) this.FindControl("txtUserName"); this.txtContent = (TextBox) this.FindControl("txtContent"); this.btnRefer = ButtonManager.Create(this.FindControl("btnRefer")); this.txtConsultationCode = (HtmlInputText) this.FindControl("txtConsultationCode"); this.prodetailsLink = (ProductDetailsLink) this.FindControl("ProductDetailsLink1"); this.btnRefer.Click += new EventHandler(this.btnRefer_Click); if (!this.Page.IsPostBack) { PageTitle.AddSiteNameTitle("商品咨询", HiContext.Current.Context); if ((HiContext.Current.User.UserRole == UserRole.Member) || (HiContext.Current.User.UserRole == UserRole.Underling)) { this.txtUserName.Text = HiContext.Current.User.Username; this.txtEmail.Text = HiContext.Current.User.Email; this.btnRefer.Text = "咨询"; } ProductInfo productSimpleInfo = ProductBrowser.GetProductSimpleInfo(this.productId); if (productSimpleInfo != null) { this.prodetailsLink.ProductId = this.productId; this.prodetailsLink.ProductName = productSimpleInfo.ProductName; } this.txtConsultationCode.Value = string.Empty; } }
protected override void AttachChildControls() { this.litUserLink = (System.Web.UI.WebControls.Literal) this.FindControl("litUserLink"); if (this.litUserLink != null) { System.Uri url = System.Web.HttpContext.Current.Request.Url; string text = (url.Port == 80) ? string.Empty : (":" + url.Port.ToString(System.Globalization.CultureInfo.InvariantCulture)); this.litUserLink.Text = string.Concat(new object[] { string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}://{1}{2}", new object[] { url.Scheme, url.Host, text }), Globals.ApplicationPath, "/?ReferralUserId=", HiContext.Current.User.UserId }); } Member member = HiContext.Current.User as Member; if (member != null) { System.Web.UI.HtmlControls.HtmlInputText control = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtUserName"); System.Web.UI.HtmlControls.HtmlInputText control2 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtRealName"); System.Web.UI.HtmlControls.HtmlInputText control3 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtPhone"); System.Web.UI.HtmlControls.HtmlInputText control4 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtEmail"); control.SetWhenIsNotNull(member.Username); control2.SetWhenIsNotNull(member.RealName); control3.SetWhenIsNotNull(member.CellPhone); control4.SetWhenIsNotNull(member.QQ); } PageTitle.AddSiteNameTitle("修改用户信息"); }
protected void TestGw_RowUpdating(object sender, GridViewUpdateEventArgs e) { System.Web.UI.HtmlControls.HtmlInputText TestStartTime = (System.Web.UI.HtmlControls.HtmlInputText) this.TestGw.Rows[e.RowIndex].FindControl("TestStartTime"); System.Web.UI.HtmlControls.HtmlInputText TestEndTime = (System.Web.UI.HtmlControls.HtmlInputText) this.TestGw.Rows[e.RowIndex].FindControl("TestEndTime"); Label id = (Label)this.TestGw.Rows[e.RowIndex].FindControl("TestID"); using (MySqlConnection Sc = new MySqlConnection(Diya.ConectionString)) { Sc.Open(); string updatestring = "Update TestInfo Set TestStartTime='" + TestStartTime.Value + "',TestEndTime='" + TestEndTime.Value + "' where TestID=" + id.Text; MySqlCommand Scmd = new MySqlCommand(updatestring, Sc); Scmd.ExecuteNonQuery(); } using (MySqlDataReader read = new Diya().RowReader("select ContactID From TSRelationship where TestID=" + id.Text)) { while (read.Read()) { using (MySqlConnection Scin = new MySqlConnection(Diya.ConectionString)) { Scin.Open(); MySqlCommand Scmd = new MySqlCommand("insert into TSRelationship(TestID,ContactID,Score)Values(" + id.Text + "," + read["ContactID"] + "," + "null)", Scin); Scmd.ExecuteNonQuery(); } } } }
protected override void AttachChildControls() { MemberInfo currentMember = MemberProcessor.GetCurrentMember(); if (currentMember != null) { System.Web.UI.WebControls.Literal control = (System.Web.UI.WebControls.Literal) this.FindControl("txtUserBindName"); System.Web.UI.HtmlControls.HtmlInputText control2 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtRealName"); System.Web.UI.HtmlControls.HtmlInputText control3 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtPhone"); System.Web.UI.HtmlControls.HtmlInputText control4 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtEmail"); System.Web.UI.HtmlControls.HtmlInputHidden control5 = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtUserName"); System.Web.UI.HtmlControls.HtmlInputText control6 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtCardID"); this.imglogo = (System.Web.UI.HtmlControls.HtmlImage) this.FindControl("imglogo"); this.Nickname = (System.Web.UI.HtmlControls.HtmlContainerControl) this.FindControl("Nickname"); this.WeixinHead = (System.Web.UI.HtmlControls.HtmlControl) this.FindControl("WeixinHead"); if (!string.IsNullOrEmpty(currentMember.UserHead)) { this.imglogo.Src = currentMember.UserHead; } this.Nickname.InnerText = currentMember.UserName; if (string.IsNullOrEmpty(currentMember.OpenId)) { this.WeixinHead.Attributes.Add("noOpenId", "true"); } control.SetWhenIsNotNull(currentMember.UserBindName); control5.SetWhenIsNotNull(currentMember.UserName); control2.SetWhenIsNotNull(currentMember.RealName); control3.SetWhenIsNotNull(currentMember.CellPhone); control4.SetWhenIsNotNull(currentMember.QQ); control6.SetWhenIsNotNull(currentMember.CardID); } PageTitle.AddSiteNameTitle("修改用户信息"); }
protected override void AttachChildControls() { PageTitle.AddSiteNameTitle("店铺消息"); this.imglogo = (System.Web.UI.HtmlControls.HtmlImage) this.FindControl("imglogo"); this.hdlogo = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("hdlogo"); this.txtstorename = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtstorename"); this.txtdescription = (System.Web.UI.HtmlControls.HtmlTextArea) this.FindControl("txtdescription"); this.txtacctount = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtacctount"); this.txtStoreTel = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtStoreTel"); DistributorsInfo userIdDistributors = DistributorsBrower.GetUserIdDistributors(Globals.GetCurrentMemberUserId()); if (userIdDistributors.ReferralStatus != 0) { System.Web.HttpContext.Current.Response.Redirect("MemberCenter.aspx"); } else { MemberInfo currentMember = MemberProcessor.GetCurrentMember(); if (userIdDistributors != null) { if (!string.IsNullOrEmpty(userIdDistributors.Logo)) { this.imglogo.Src = userIdDistributors.Logo; } this.hdlogo.Value = userIdDistributors.Logo; this.txtstorename.Value = userIdDistributors.StoreName; this.txtdescription.Value = userIdDistributors.StoreDescription; this.txtacctount.Value = userIdDistributors.RequestAccount; this.txtStoreTel.Value = currentMember.CellPhone; } } }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId)) { base.GotoResourceNotFound(); } this.txtEmail = (System.Web.UI.WebControls.TextBox) this.FindControl("txtEmail"); this.txtUserName = (System.Web.UI.WebControls.TextBox) this.FindControl("txtUserName"); this.txtContent = (System.Web.UI.WebControls.TextBox) this.FindControl("txtContent"); this.btnRefer = ButtonManager.Create(this.FindControl("btnRefer")); this.txtConsultationCode = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtConsultationCode"); this.prodetailsLink = (ProductDetailsLink)this.FindControl("ProductDetailsLink1"); this.btnRefer.Click += new System.EventHandler(this.btnRefer_Click); if (!this.Page.IsPostBack && HiContext.Current.User.UserRole == UserRole.Member) { this.txtUserName.Text = HiContext.Current.User.Username; this.txtEmail.Text = HiContext.Current.User.Email; this.btnRefer.Text = "咨询"; } PageTitle.AddSiteNameTitle("商品咨询"); ProductInfo productSimpleInfo = ProductBrowser.GetProductSimpleInfo(this.productId); if (productSimpleInfo != null) { this.prodetailsLink.ProductId = this.productId; this.prodetailsLink.ProductName = productSimpleInfo.ProductName; } this.txtConsultationCode.Value = string.Empty; }
protected override void CreateChildControls() { //cellSpacing="1" cellPadding="1" width="300" border="0" fileTable.CellPadding = 1; fileTable.CellSpacing = 1; fileTable.BorderStyle = BorderStyle.None; fileTable.Width = 300; fileTable.Attributes.Add("align","center"); srcTextBox.ID="FilePicker1"; srcTextBox.Enabled = false; srcTextBox.fpAllowedUploadFileExts = "gif,jpg,jpeg,png"; srcTextBox.fpUploadDir="/Uploads"; srcTextBox.fpPopupURL = "FilePicker.aspx"; srcTextBox.fpImageURL= "/images/browse.gif"; srcTextBox.fpAllowCreateDirs = false; srcTextBox.fpAllowDelete = false; fileMgrCell.Controls.Add(new LiteralControl("Image Source: ")); fileMgrCell.Attributes.Add("colSpan","4"); fileMgrCell.Controls.Add(srcTextBox); fileMgrRow.Cells.Add(fileMgrCell); fileTable.Rows.Add(fileMgrRow); altTextCell.Controls.Add(new LiteralControl("Alternate Text:")); HtmlInputText altText = new HtmlInputText(); altText.ID="AltText"; altTextCell.Wrap = false; altTextCell.Attributes.Add("colSpan","4"); altTextCell.Controls.Add(altText); altTextRow.Cells.Add(altTextCell); fileTable.Rows.Add(altTextRow); HtmlSelect selAlign = new HtmlSelect(); selAlign.Items.Add("Select"); selAlign.Items.Add("Left"); selAlign.Items.Add("Middle"); selAlign.Items.Add("Right"); selAlign.Items.Add("Absbottom"); selAlign.Items.Add("Absmiddle"); selAlign.Items.Add("Baseline"); HtmlInputText borderSize = new HtmlInputText(); borderSize.Size = 1; borderSize.ID="border"; cell1Row1.Controls.Add(new LiteralControl("Alignment:")); cell2Row1.Controls.Add(selAlign); cell3Row1.Controls.Add(new LiteralControl("Border Size:")); cell4Row1.Controls.Add(borderSize); propRow1.Cells.Add(cell1Row1); propRow1.Cells.Add(cell2Row1); propRow1.Cells.Add(cell3Row1); propRow1.Cells.Add(cell4Row1); fileTable.Rows.Add(propRow1); Controls.Add(fileTable); }
//############################################################ //############################################################ void UpdateVSFDetails() { Repeater oRpt = (Repeater)this.form1.FindControl("repeaterVSFDetails"); foreach (RepeaterItem oItem in oRpt.Items) { System.Web.UI.HtmlControls.HtmlInputHidden VendorId = ((System.Web.UI.HtmlControls.HtmlInputHidden)oItem.FindControl("VendorId")); System.Web.UI.HtmlControls.HtmlInputText SAPRatingScore = ((System.Web.UI.HtmlControls.HtmlInputText)oItem.FindControl("SAPRatingScore")); System.Web.UI.HtmlControls.HtmlInputText SAPRatingRank = ((System.Web.UI.HtmlControls.HtmlInputText)oItem.FindControl("SAPRatingRank")); System.Web.UI.HtmlControls.HtmlInputText MaxExposureLimit = ((System.Web.UI.HtmlControls.HtmlInputText)oItem.FindControl("MaxExposureLimit")); System.Web.UI.HtmlControls.HtmlInputText AmountUnservedPO = ((System.Web.UI.HtmlControls.HtmlInputText)oItem.FindControl("AmountUnservedPO")); System.Web.UI.HtmlControls.HtmlInputText AvailBalance = ((System.Web.UI.HtmlControls.HtmlInputText)oItem.FindControl("AvailBalance")); System.Web.UI.HtmlControls.HtmlInputText FCRank = ((System.Web.UI.HtmlControls.HtmlInputText)oItem.FindControl("FCRank")); //System.Web.UI.HtmlControls.HtmlInputText EndoresedBy = ((System.Web.UI.HtmlControls.HtmlInputText)oItem.FindControl("EndoresedBy")); //RadioButtonList ProductTypeApproval = ((RadioButtonList)oItem.FindControl("ProductTypeApproval")); System.Web.UI.HtmlControls.HtmlInputText OverallRanking = ((System.Web.UI.HtmlControls.HtmlInputText)oItem.FindControl("OverallRanking")); CheckBox Selected = ((CheckBox)oItem.FindControl("Selected")); query = "UPDATE tblVSFDetails SET SAPRatingScore=@SAPRatingScore, SAPRatingRank=@SAPRatingRank, MaxExposureLimit=@MaxExposureLimit, AmountUnservedPO=@AmountUnservedPO, AvailBalance=@AvailBalance, FCRank=@FCRank, EndoresedBy=@EndoresedBy, ProductTypeApproval=@ProductTypeApproval, OverallRanking=@OverallRanking, Selected=@Selected WHERE VendorId = @VendorId AND VSFId=@VSFId"; //query = "sp_GetVendorInformation"; //##storedProcedure using (conn = new SqlConnection(connstring)) { using (cmd = new SqlCommand(query, conn)) { //cmd.CommandType = CommandType.StoredProcedure; //##storedProcedure cmd.Parameters.AddWithValue("@VSFId", Convert.ToInt32(Session["VSFId"].ToString())); cmd.Parameters.AddWithValue("@VendorId", Convert.ToInt32(VendorId.Value)); cmd.Parameters.AddWithValue("@SAPRatingScore", SAPRatingScore.Value != "" ? Convert.ToDouble(SAPRatingScore.Value.Replace(",", "")) : 0); cmd.Parameters.AddWithValue("@SAPRatingRank", SAPRatingRank.Value != "" ? Convert.ToInt32(SAPRatingRank.Value.Replace(",", "")) : 0); cmd.Parameters.AddWithValue("@MaxExposureLimit", MaxExposureLimit.Value != "" ? Convert.ToDouble(MaxExposureLimit.Value.Replace(",", "")) : 0); cmd.Parameters.AddWithValue("@AmountUnservedPO", AmountUnservedPO.Value != "" ? Convert.ToDouble(AmountUnservedPO.Value.Replace(",", "")) : 0); cmd.Parameters.AddWithValue("@AvailBalance", AvailBalance.Value != "" ? Convert.ToDouble(AvailBalance.Value.Replace(",", "")) : 0); cmd.Parameters.AddWithValue("@FCRank", FCRank.Value != "" ? Convert.ToInt32(FCRank.Value.Replace(",", "")) : 0); cmd.Parameters.AddWithValue("@EndoresedBy", ((DropDownList)oItem.FindControl("EndoresedBy")).SelectedValue); cmd.Parameters.AddWithValue("@ProductTypeApproval", ((DropDownList)oItem.FindControl("ProductTypeApproval")).SelectedValue); cmd.Parameters.AddWithValue("@OverallRanking", OverallRanking.Value != "" ? Convert.ToDouble(OverallRanking.Value.Replace(",", "")) : 0); cmd.Parameters.AddWithValue("@Selected", Selected.Checked == true ? 1 : 0); conn.Open(); cmd.ExecuteNonQuery(); } } } query = "sp_updateVSFRanking"; //##storedProcedure using (conn = new SqlConnection(connstring)) { using (cmd = new SqlCommand(query, conn)) { cmd.CommandType = CommandType.StoredProcedure; //##storedProcedure cmd.Parameters.AddWithValue("@VSFId", Convert.ToInt32(Session["VSFId"].ToString())); conn.Open(); cmd.ExecuteNonQuery(); } } }
private void AddBookInputText(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { this.bookInputText = new HtmlInputText(); this.bookInputText.Attributes.Add("placeholder", Titles.Book); field.Controls.Add(this.bookInputText); container.Controls.Add(field); } }
public int userid; //用户ID #endregion Fields #region Methods protected void Bind(int id) { lb_ID.Text = id.ToString(); CY.GFive.Core.Business.Vote vote = CY.GFive.Core.Business.Vote.Load(id); lb_VoteName.Text = vote.VoteTitle; IList<CY.GFive.Core.Business.VoteItem> itemlist = CY.GFive.Core.Business.VoteItem.GetVoteItemByVoteID(id); int Anscount = 0; for (int i = 0; i < itemlist.Count; i++) { lb_Title.Controls.Add(new LiteralControl("<p>")); lb_Title.Controls.Add(new LiteralControl(itemlist[i].VoteItemContent)); if (itemlist[i].IsMutiChoose == 1) { lb_Title.Controls.Add(new LiteralControl("(多选):")); } else { lb_Title.Controls.Add(new LiteralControl(":")); } lb_Title.Controls.Add(new LiteralControl("</p>")); lb_Title.Controls.Add(new LiteralControl("<p>")); IList<CY.GFive.Core.Business.VoteAnswer> answerlist = CY.GFive.Core.Business.VoteAnswer.GetVoteAnswerByVoteItemID(itemlist[i].Id); lb_ItemCount.Text = itemlist[i].Id.ToString(); for (int j = 0; j < answerlist.Count; j++) { if (itemlist[i].IsMutiChoose == 0) { HtmlInputRadioButton rb1 = new HtmlInputRadioButton(); rb1.ID = answerlist[j].Id.ToString(); rb1.Attributes.Add("runat", "server"); rb1.Name = "rb_" + itemlist[i].Id; lb_Title.Controls.Add(rb1); lb_Title.Controls.Add(new LiteralControl(answerlist[j].VoteAnswerContent + " ")); if (Anscount <= answerlist[j].Id) { Anscount = answerlist[j].Id; } } if (itemlist[i].IsMutiChoose == 1) { HtmlInputCheckBox cb1 = new HtmlInputCheckBox(); cb1.ID = "cb_" + itemlist[i].Id + "_" + answerlist[j].Id.ToString(); cb1.Attributes.Add("runat", "server"); lb_Title.Controls.Add(cb1); lb_Title.Controls.Add(new LiteralControl(answerlist[j].VoteAnswerContent + " ")); if (Anscount <= answerlist[j].Id) { Anscount = answerlist[j].Id; } } } if (itemlist[i].IsUserDefine == 1) { lb_Title.Controls.Add(new LiteralControl("其它答案")); HtmlInputText tb1 = new HtmlInputText(); tb1.ID = "tb_" + itemlist[i].Id.ToString(); lb_Title.Controls.Add(tb1); } lb_Title.Controls.Add(new LiteralControl("<p>")); } lb_anscount.Text = Anscount.ToString(); }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId)) { base.GotoResourceNotFound(); } this.hlinkProductOfTitle = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlinkProductOfTitle"); this.hlinkProductOfContext = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlinkProductOfContext"); this.hlinkHome = (System.Web.UI.WebControls.HyperLink) this.FindControl("hlinkHome"); this.litProductUrl = (System.Web.UI.WebControls.Literal) this.FindControl("litProductUrl"); this.txtFriendEmail = (System.Web.UI.WebControls.TextBox) this.FindControl("txtFriendEmail"); this.txtFriendName = (System.Web.UI.WebControls.TextBox) this.FindControl("txtFriendName"); this.txtUserName = (System.Web.UI.WebControls.TextBox) this.FindControl("txtUserName"); this.txtMessage = (System.Web.UI.WebControls.TextBox) this.FindControl("txtMessage"); this.btnRefer = (System.Web.UI.WebControls.Button) this.FindControl("btnRefer"); this.txtTJCode = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtTJCode"); this.btnRefer.Click += new System.EventHandler(this.btnRefer_Click); if (!this.Page.IsPostBack) { ProductInfo productSimpleInfo = ProductBrowser.GetProductSimpleInfo(this.productId); if (productSimpleInfo != null) { Hidistro.Membership.Core.IUser user = Hidistro.Membership.Context.HiContext.Current.User; this.txtUserName.Text = user.Username; this.hlinkProductOfTitle.Text = productSimpleInfo.ProductName; this.hlinkProductOfTitle.NavigateUrl = Globals.GetSiteUrls().UrlData.FormatUrl("productDetails", new object[] { this.productId }); this.hlinkProductOfContext.Text = productSimpleInfo.ProductName; this.hlinkProductOfContext.NavigateUrl = Globals.GetSiteUrls().UrlData.FormatUrl("productDetails", new object[] { this.productId }); this.hlinkHome.NavigateUrl = Globals.GetSiteUrls().UrlData.FormatUrl("home"); this.hlinkHome.Text = Hidistro.Membership.Context.HiContext.Current.SiteSettings.SiteName; this.txtTJCode.Value = string.Empty; if (user.UserRole == Hidistro.Membership.Core.Enums.UserRole.Member || user.UserRole == Hidistro.Membership.Core.Enums.UserRole.Underling) { this.litProductUrl.Text = Globals.FullPath(System.Web.HttpContext.Current.Request.Url.PathAndQuery).Replace("IntroducedToFriend", "productDetails") + "&ReferralUserId=" + user.UserId; } else { this.litProductUrl.Text = Globals.FullPath(Globals.GetSiteUrls().UrlData.FormatUrl("productDetails", new object[] { this.productId })); } PageTitle.AddSiteNameTitle(productSimpleInfo.ProductName + " 推荐给好友", Hidistro.Membership.Context.HiContext.Current.Context); } } }
public void IsEnabledControl(bool IsEnabled) { ControlCollection Ctrls = this.Controls; foreach (Control item in Ctrls) { System.Web.UI.HtmlControls.HtmlInputText text = item as System.Web.UI.HtmlControls.HtmlInputText; if (text != null) { text.Attributes.Add("readonly", IsEnabled ? "true" : "false"); } } }
protected override void AttachChildControls() { int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId); this.keyWord = this.Page.Request.QueryString["keyWord"]; if (!string.IsNullOrWhiteSpace(this.keyWord)) { this.keyWord = this.keyWord.Trim(); } this.txtkeywords = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("keywords"); this.rpChooseProducts = (VshopTemplatedRepeater)this.FindControl("rpChooseProducts"); this.rpCategorys = (VshopTemplatedRepeater)this.FindControl("rpCategorys"); this.DataBindSoruce(); }
protected override void AttachChildControls() { this.txtOrderId = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtOrderId"); this.imgbtnSearch = (System.Web.UI.WebControls.ImageButton) this.FindControl("imgbtnSearch"); this.RefundList = (Common_OrderManage_RefundApply)this.FindControl("Common_OrderManage_RefundApply"); this.handleStatus = (System.Web.UI.HtmlControls.HtmlSelect) this.FindControl("handleStatus"); this.pager = (Pager)this.FindControl("pager"); this.imgbtnSearch.Click += new System.Web.UI.ImageClickEventHandler(this.imgbtnSearch_Click); if (!this.Page.IsPostBack) { this.BindRefund(); } }
protected override void AttachChildControls() { int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId); this.keyWord = this.Page.Request.QueryString["keyWord"]; if (!string.IsNullOrWhiteSpace(this.keyWord)) { this.keyWord = this.keyWord.Trim(); } this.txtkeywords = (HtmlInputText) this.FindControl("keywords"); this.rpChooseProducts = (VshopTemplatedRepeater) this.FindControl("rpChooseProducts"); this.rpCategorys = (VshopTemplatedRepeater) this.FindControl("rpCategorys"); this.DataBindSoruce(); }
private void AddQuantityInputText(TableRow row) { using (TableCell cell = this.GetCell()) { using (HtmlInputText quantityInputText = new HtmlInputText()) { quantityInputText.ID = "QuantityInputText"; quantityInputText.Attributes.Add("class", "text-right integer"); cell.Controls.Add(quantityInputText); } row.Controls.Add(cell); } }
private void AddItemCodeInputText(TableRow row) { using (TableCell cell = this.GetCell()) { using (HtmlInputText itemCodeInputText = new HtmlInputText()) { itemCodeInputText.ID = "ItemCodeInputText"; cell.Controls.Add(itemCodeInputText); } row.Controls.Add(cell); } }
protected override void AttachChildControls() { System.Web.UI.HtmlControls.HtmlInputText control2 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtRealName"); System.Web.UI.HtmlControls.HtmlInputText control5 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtIdentityCard"); Member member = HiContext.Current.User as Member; if (member != null) { control2.SetWhenIsNotNull(member.RealName); control5.SetWhenIsNotNull(member.IdentityCard); } PageTitle.AddSiteNameTitle("身份信息验证"); }
protected override void AttachChildControls() { this.txtcode = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtcode"); this.txtemail = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtemail"); this.btnSubmit = (System.Web.UI.WebControls.Button) this.FindControl("btnSubmit"); this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click); string userName = HiContext.Current.User.Username; //Regex reg = new Regex("^[0-9]*$"); ////判断是否为邮箱注册用户 是绑定邮箱到txtemail //if (!reg.IsMatch(userName)) //{ // this.txtemail.Disabled = true; // this.txtemail.Value = userName; //} }
protected override void AttachChildControls() { this.txtOrderId = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtOrderId"); this.imgbtnSearch = (System.Web.UI.WebControls.ImageButton) this.FindControl("imgbtnSearch"); this.listOrders = (Common_OrderRecycleBin_OrderList)this.FindControl("common_orderrecyclebin_orderlist"); this.listOrders.ItemDataBound += new Common_OrderRecycleBin_OrderList.DataBindEventHandler(this.listOrders_ItemDataBound); this.listOrders.ItemCommand += new Common_OrderRecycleBin_OrderList.CommandEventHandler(this.listOrders_ItemCommand); this.pager = (Pager)this.FindControl("pager"); this.imgbtnSearch.Click += new System.Web.UI.ImageClickEventHandler(this.imgbtnSearch_Click); if (!this.Page.IsPostBack) { this.BindOrders(); } }
private static void CreateItemCodeField(TableRow row) { using (TableCell cell = new TableCell()) { using (HtmlInputText itemCodeInputText = new HtmlInputText()) { itemCodeInputText.ID = "ItemCodeInputText"; itemCodeInputText.Attributes.Add("title", "ALT + C"); cell.Controls.Add(itemCodeInputText); } row.Cells.Add(cell); } }
protected override void AttachChildControls() { this.txtcode = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtcode"); this.txtcellphone = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtcellphone"); this.btnSubmit = (System.Web.UI.WebControls.Button) this.FindControl("btnSubmit"); this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click); string txtcellphone = HiContext.Current.User.Username; //Regex reg = new Regex("^[0-9]*$"); ////判断是否为手机注册 是绑定手机号到txtcellphone //if (reg.IsMatch(txtcellphone)) //{ // this.txtcellphone.Disabled = true; // this.txtcellphone.Value = txtcellphone; //} }
private void CreateCommentCell(TableRow row, int index) { using (TableCell cell = new TableCell()) { using (HtmlInputText commentTextBox = new HtmlInputText()) { commentTextBox.ID = "CommentTextBox" + index; commentTextBox.Attributes.Add("class", "comment"); cell.Controls.Add(commentTextBox); } row.Controls.Add(cell); } }
protected override void AttachChildControls() { MemberInfo currentMember = MemberProcessor.GetCurrentMember(); if (currentMember != null) { System.Web.UI.HtmlControls.HtmlInputText control = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtRealName"); System.Web.UI.HtmlControls.HtmlInputText control2 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtPhone"); System.Web.UI.HtmlControls.HtmlInputText control3 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtMicroSignal"); control.SetWhenIsNotNull(currentMember.RealName); control2.SetWhenIsNotNull(currentMember.CellPhone); control3.SetWhenIsNotNull(currentMember.MicroSignal); } PageTitle.AddSiteNameTitle("我的名片"); }
private static void CreateTaxtField(TableRow row) { using (TableCell cell = new TableCell()) { using (HtmlInputText taxInputText = new HtmlInputText()) { taxInputText.ID = "TaxInputText"; taxInputText.Attributes.Add("class", "currency text-right"); taxInputText.Attributes.Add("readonly", "readonly"); cell.Controls.Add(taxInputText); } row.Cells.Add(cell); } }
protected override void AttachChildControls() { PageTitle.AddSiteNameTitle("申请提现"); this.litMaxMoney = (Literal) this.FindControl("litMaxMoney"); this.txtaccount = (HtmlInputText) this.FindControl("txtaccount"); this.txtmoney = (HtmlInputText) this.FindControl("txtmoney"); DistributorsInfo userIdDistributors = DistributorsBrower.GetUserIdDistributors(Globals.GetCurrentMemberUserId()); this.txtaccount.Value = userIdDistributors.RequestAccount; this.litMaxMoney.Text = userIdDistributors.ReferralBlance.ToString("F2"); decimal result = 0M; if (decimal.TryParse(SettingsManager.GetMasterSettings(false).MentionNowMoney, out result) && (result > 0M)) { this.litMaxMoney.Text = ((userIdDistributors.ReferralBlance / result) * result).ToString("F2"); this.txtmoney.Attributes["placeholder"] = "请输入" + result + "的倍数金额"; } }
private static void CreateDiscountField(TableRow row) { using (TableCell cell = new TableCell()) { using (HtmlInputText discountInputText = new HtmlInputText()) { discountInputText.ID = "DiscountInputText"; discountInputText.Attributes.Add("title", "Ctrl + D"); discountInputText.Attributes.Add("class", "currency text-right"); cell.Controls.Add(discountInputText); } row.Cells.Add(cell); } }
private static void CreatePriceField(TableRow row) { using (TableCell cell = new TableCell()) { using (HtmlInputText priceInputText = new HtmlInputText()) { priceInputText.ID = "PriceInputText"; priceInputText.Attributes.Add("title", "Alt + P"); priceInputText.Attributes.Add("class", "currency text-right"); cell.Controls.Add(priceInputText); } row.Cells.Add(cell); } }
private static void CreateSubTotalField(TableRow row) { using (TableCell cell = new TableCell()) { using (HtmlInputText subTotalInputText = new HtmlInputText()) { subTotalInputText.ID = "SubTotalInputText"; subTotalInputText.Attributes.Add("class", "currency text-right"); subTotalInputText.Attributes.Add("readonly", "readonly"); cell.Controls.Add(subTotalInputText); } row.Cells.Add(cell); } }
protected virtual void Dispose(bool disposing) { if (!disposing) { return; } if (this.currentPeriodDateTextBox != null) { this.currentPeriodDateTextBox.Dispose(); this.currentPeriodDateTextBox = null; } if (this.previousPeriodDateTextBox != null) { this.previousPeriodDateTextBox.Dispose(); this.previousPeriodDateTextBox = null; } if (this.factorInputText != null) { this.factorInputText.Dispose(); this.factorInputText = null; } if (this.showButton != null) { this.showButton.Dispose(); this.showButton = null; } if (this.printButton != null) { this.printButton.Dispose(); this.printButton = null; } if (this.grid != null) { this.grid.RowDataBound -= this.Grid_RowDataBound; this.grid.DataBound -= this.Grid_DataBound; this.grid.Dispose(); this.grid = null; } this.disposed = true; }
protected override void AttachChildControls() { System.Web.UI.HtmlControls.HtmlInputText control = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtUserName"); System.Web.UI.HtmlControls.HtmlInputText control2 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtRealName"); System.Web.UI.HtmlControls.HtmlInputText control3 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtPhone"); System.Web.UI.HtmlControls.HtmlInputText control4 = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtEmail"); Member member = HiContext.Current.User as Member; if (member != null) { control.SetWhenIsNotNull(member.Username); control2.SetWhenIsNotNull(member.RealName); control3.SetWhenIsNotNull(member.CellPhone); control4.SetWhenIsNotNull(member.QQ); } PageTitle.AddSiteNameTitle("修改用户信息"); }
public static HtmlInputText GetInputText(string id, string cssClass) { using (HtmlInputText input = new HtmlInputText()) { if (!string.IsNullOrWhiteSpace(id)) { input.ID = id; } if (!string.IsNullOrWhiteSpace(cssClass)) { input.Attributes.Add("class", cssClass); } return input; } }
private void AddFactorField(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.Factor, "FactorInputText")) { field.Controls.Add(label); } this.factorInputText = new HtmlInputText(); this.factorInputText.ID = "FactorInputText"; this.factorInputText.Attributes.Add("class", "small input integer"); this.factorInputText.Value = "1000"; field.Controls.Add(this.factorInputText); container.Controls.Add(field); } }
protected override void AttachChildControls() { this.shipTo = (HtmlInputText) this.FindControl("shipTo"); this.address = (HtmlTextArea) this.FindControl("address"); this.cellphone = (HtmlInputText) this.FindControl("cellphone"); this.Hiddenshipid = (HtmlInputHidden) this.FindControl("shipId"); this.regionText = (HtmlInputHidden) this.FindControl("regionText"); this.region = (HtmlInputHidden) this.FindControl("region"); ShippingAddressInfo shippingAddress = MemberProcessor.GetShippingAddress(this.shippingid); string fullRegion = RegionHelper.GetFullRegion(shippingAddress.RegionId, " "); this.shipTo.Value = shippingAddress.ShipTo; this.address.Value = shippingAddress.Address; this.cellphone.Value = shippingAddress.CellPhone; this.Hiddenshipid.Value = this.shippingid.ToString(); this.regionText.SetWhenIsNotNull(fullRegion); this.region.SetWhenIsNotNull(shippingAddress.RegionId.ToString()); PageTitle.AddSiteNameTitle("编辑收货地址"); }
protected override void AttachChildControls() { this.rptProducts = (ThemedTemplatedRepeater) this.FindControl("rptProducts"); this.pager = (Pager) this.FindControl("pager"); this.litSearchResultPage = (Literal) this.FindControl("litSearchResultPage"); this.txtSKU = (HtmlInputText) this.FindControl("txtSKU"); this.txtKeywords = (HtmlInputText) this.FindControl("txtKeywords"); this.txtStartPrice = (HtmlInputText) this.FindControl("txtStartPrice"); this.txtEndPrice = (HtmlInputText) this.FindControl("txtEndPrice"); this.btnSearch = ButtonManager.Create(this.FindControl("btnSearch")); this.btnSearch.Click += new EventHandler(this.btnSearch_Click); if (!this.Page.IsPostBack) { string title = "商品下架区"; PageTitle.AddTitle(title, HiContext.Current.Context); this.BindProducts(this.GetProductBrowseQuery()); } }
private static void CreateQuantityField(TableRow row) { using (TableCell cell = new TableCell()) { using (HtmlInputText quantityInputText = new HtmlInputText()) { quantityInputText.ID = "QuantityInputText"; quantityInputText.Attributes.Add("title", "Ctrl + Q"); quantityInputText.Attributes.Add("class", "integer text-right"); quantityInputText.Value = "1"; cell.Controls.Add(quantityInputText); } row.Cells.Add(cell); } }
protected override void AttachChildControls() { PageTitle.AddSiteNameTitle("已上架商品"); int.TryParse(this.Page.Request.QueryString["categoryId"], out this.categoryId); this.keyWord = this.Page.Request["keyWord"]; if (!string.IsNullOrWhiteSpace(this.keyWord)) { this.keyWord = this.keyWord.Trim(); } this.txtkeywords = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("keywords"); this.rpChooseProducts = (VshopTemplatedRepeater)this.FindControl("rpChooseProducts"); this.rpCategorys = (VshopTemplatedRepeater)this.FindControl("rpCategorys"); this.Puserid = (System.Web.UI.WebControls.Literal) this.FindControl("Puserid"); this.litProtuctSelNum = (System.Web.UI.WebControls.Literal) this.FindControl("litProtuctSelNum"); this.litProtuctNoSelNum = (System.Web.UI.WebControls.Literal) this.FindControl("litProtuctNoSelNum"); this.Puserid.Text = Globals.GetCurrentMemberUserId(false).ToString(); this.DataBindSoruce(); }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["productId"], out this.productId)) { base.GotoResourceNotFound(); } this.hlinkProductOfTitle = (HyperLink) this.FindControl("hlinkProductOfTitle"); this.hlinkProductOfContext = (HyperLink) this.FindControl("hlinkProductOfContext"); this.hlinkHome = (HyperLink) this.FindControl("hlinkHome"); this.litProductUrl = (Literal) this.FindControl("litProductUrl"); this.txtFriendEmail = (TextBox) this.FindControl("txtFriendEmail"); this.txtFriendName = (TextBox) this.FindControl("txtFriendName"); this.txtUserName = (TextBox) this.FindControl("txtUserName"); this.txtMessage = (TextBox) this.FindControl("txtMessage"); this.btnRefer = (Button) this.FindControl("btnRefer"); this.txtTJCode = (HtmlInputText) this.FindControl("txtTJCode"); this.btnRefer.Click += new EventHandler(this.btnRefer_Click); if (!this.Page.IsPostBack) { ProductInfo productSimpleInfo = ProductBrowser.GetProductSimpleInfo(this.productId); if (productSimpleInfo != null) { IUser user = HiContext.Current.User; this.txtUserName.Text = user.Username; this.hlinkProductOfTitle.Text = productSimpleInfo.ProductName; this.hlinkProductOfTitle.NavigateUrl = Globals.GetSiteUrls().UrlData.FormatUrl("productDetails", new object[] { this.productId }); this.hlinkProductOfContext.Text = productSimpleInfo.ProductName; this.hlinkProductOfContext.NavigateUrl = Globals.GetSiteUrls().UrlData.FormatUrl("productDetails", new object[] { this.productId }); this.hlinkHome.NavigateUrl = Globals.GetSiteUrls().UrlData.FormatUrl("home"); this.hlinkHome.Text = HiContext.Current.SiteSettings.SiteName; this.txtTJCode.Value = string.Empty; if ((user.UserRole == UserRole.Member) || (user.UserRole == UserRole.Underling)) { this.litProductUrl.Text = Globals.FullPath(HttpContext.Current.Request.Url.PathAndQuery).Replace("IntroducedToFriend", "productDetails") + "&ReferralUserId=" + user.UserId; } else { this.litProductUrl.Text = Globals.FullPath(Globals.GetSiteUrls().UrlData.FormatUrl("productDetails", new object[] { this.productId })); } PageTitle.AddTitle("推荐给好友", HiContext.Current.Context); } } }
protected override void AttachChildControls() { this.shipTo = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("shipTo"); this.address = (System.Web.UI.HtmlControls.HtmlTextArea) this.FindControl("address"); this.cellphone = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("cellphone"); this.Hiddenshipid = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("shipId"); this.regionText = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("regionText"); this.region = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("region"); ShippingAddressInfo shippingAddress = MemberProcessor.GetShippingAddress(this.shippingid); string fullRegion = RegionHelper.GetFullRegion(shippingAddress.RegionId, " "); this.shipTo.Value = shippingAddress.ShipTo; this.address.Value = shippingAddress.Address; this.cellphone.Value = shippingAddress.CellPhone; this.Hiddenshipid.Value = this.shippingid.ToString(); this.regionText.SetWhenIsNotNull(fullRegion); this.region.SetWhenIsNotNull(shippingAddress.RegionId.ToString()); PageTitle.AddSiteNameTitle("编辑收货地址"); }
protected override void AttachChildControls() { PageTitle.AddSiteNameTitle("店铺消息"); this.imglogo = (System.Web.UI.HtmlControls.HtmlImage) this.FindControl("imglogo"); this.hdlogo = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("hdlogo"); this.txtstorename = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtstorename"); this.txtdescription = (System.Web.UI.HtmlControls.HtmlTextArea) this.FindControl("txtdescription"); this.txtacctount = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtacctount"); this.txtStoreTel = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtStoreTel"); DistributorsInfo userIdDistributors = DistributorsBrower.GetUserIdDistributors(Globals.GetCurrentMemberUserId(false)); if (userIdDistributors.ReferralStatus != 0) { System.Web.HttpContext.Current.Response.Redirect("MemberCenter.aspx"); } else { MemberInfo currentMember = MemberProcessor.GetCurrentMember(); if (userIdDistributors != null) { if (!string.IsNullOrEmpty(userIdDistributors.Logo)) { this.imglogo.Src = userIdDistributors.Logo; } this.hdlogo.Value = userIdDistributors.Logo; this.txtstorename.Value = userIdDistributors.StoreName; this.txtdescription.Value = userIdDistributors.StoreDescription; this.txtacctount.Value = userIdDistributors.RequestAccount; this.txtStoreTel.Value = currentMember.CellPhone; this.litJs = (System.Web.UI.WebControls.Literal) this.FindControl("litJs"); SiteSettings masterSettings = SettingsManager.GetMasterSettings(true); if (masterSettings.IsShowDistributorSelfStoreName) { this.litJs.Text = "<script>$(function () {$('#idFile').uploadPreview({ Img: 'imglogo', Width: 100, Height: 100 });$('#savemes').removeAttr('disabled');$('.notmodifyshop').show(); });</script>"; } else { this.litJs.Text = "<script>$(function () {$('input,textarea').attr('disabled','true'); });</script>"; } } } }
private static void AddTaxTotalField(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.TaxTotal, "TaxTotalInputText")) { field.Controls.Add(label); } using (HtmlInputText taxTotalInputText = new HtmlInputText()) { taxTotalInputText.ID = "TaxTotalInputText"; taxTotalInputText.Attributes.Add("class", "currency"); taxTotalInputText.Attributes.Add("readonly", "readonly"); field.Controls.Add(taxTotalInputText); } container.Controls.Add(field); } }
private void CreateShippingChargeField(TableRow row) { using (TableCell cell = new TableCell()) { using (HtmlInputText shippingChargeInputText = new HtmlInputText()) { shippingChargeInputText.ID = "ShippingChargeInputText"; shippingChargeInputText.Attributes.Add("title", "Ctrl + D"); shippingChargeInputText.Attributes.Add("class", "currency text-right"); if (!this.ShowShippingInformation) { shippingChargeInputText.Attributes.Add("readonly", "readonly"); } cell.Controls.Add(shippingChargeInputText); } row.Cells.Add(cell); } }
protected override void AttachChildControls() { PageTitle.AddSiteNameTitle("店铺消息"); this.imglogo = (HtmlImage) this.FindControl("imglogo"); this.litBackImg = (Literal) this.FindControl("litBackImg"); this.hdbackimg = (HtmlInputHidden) this.FindControl("hdbackimg"); this.hdlogo = (HtmlInputHidden) this.FindControl("hdlogo"); this.txtstorename = (HtmlInputText) this.FindControl("txtstorename"); this.txtdescription = (HtmlTextArea) this.FindControl("txtdescription"); DistributorsInfo currentDistributors = DistributorsBrower.GetCurrentDistributors(Globals.GetCurrentMemberUserId()); if (currentDistributors != null) { if (!string.IsNullOrEmpty(currentDistributors.Logo)) { this.imglogo.Src = currentDistributors.Logo; } this.hdbackimg.Value = currentDistributors.BackImage; this.txtstorename.Value = currentDistributors.StoreName; this.txtdescription.Value = currentDistributors.StoreDescription; if (this.litBackImg != null) { List<string> list = SettingsManager.GetMasterSettings(false).DistributorBackgroundPic.Split(new char[] { '|' }).ToList<string>(); foreach (string str in list) { if (!string.IsNullOrEmpty(str)) { if (this.hdbackimg.Value == str) { this.litBackImg.Text = this.litBackImg.Text + "<div class=\"disactive\"><span class=\"mark\"></span><img src=\"" + str + "\"/></div>"; } else { this.litBackImg.Text = this.litBackImg.Text + "<div><span class=\"mark\"></span><img src=\"" + str + "\" /></div>"; } } } } } }
private void AddReferenceNumberTextBox(HtmlGenericControl fields) { using (HtmlGenericControl field = FormHelper.GetField()) { using (HtmlGenericControl label = new HtmlGenericControl()) { label.TagName = "label"; label.Attributes.Add("for", "ReferenceNumberInputText"); label.InnerText = Titles.ReferenceNumberAbbreviated; field.Controls.Add(label); } using (HtmlInputText referenceNumberInputText = new HtmlInputText()) { referenceNumberInputText.ID = "ReferenceNumberInputText"; referenceNumberInputText.MaxLength = 24; field.Controls.Add(referenceNumberInputText); } fields.Controls.Add(field); } }
///// <summary> ///// 审核中 ///// </summary> ///// <param name="OperationType">0 审核中 </param> ///// <param name="msg"></param> ///// <returns></returns> //private void ProcessNew(int OperationType) //{ // bool result = false; // string msg = ""; // try // { // Tb_Ticket_Order mOrder = ViewState["Order"] as Tb_Ticket_Order; // List<Tb_Ticket_Passenger> PassengerList = ViewState["PassengerList"] as List<Tb_Ticket_Passenger>; // PbProject.Logic.Order.Tb_Ticket_OrderBLL orderBll = new PbProject.Logic.Order.Tb_Ticket_OrderBLL(); // #region 处理订单状态 // int OrderType = mOrder.TicketStatus; //3.退 4.废 5.改 // if (OperationType == 0 && (mOrder.OrderStatusCode == 6 || mOrder.OrderStatusCode == 7 || mOrder.OrderStatusCode == 8)) //审核中 // { // //修改订单状态为 审核中 // if (OrderType == 3) // mOrder.OrderStatusCode = 29; // else if (OrderType == 4) // mOrder.OrderStatusCode = 30; // else if (OrderType == 5) // mOrder.OrderStatusCode = 31; // string content = ""; // #region 记录手续费日志 // // 11 13 16 17 21 22 29 30 // if (mOrder.OrderStatusCode == 29 || mOrder.OrderStatusCode == 30) // { // string temp = ""; // bool re = false; // mOrder.A4 = DateTime.Parse(txtA4.Text.Trim()); // mOrder.A6 = decimal.Parse(txtA6.Text.Trim()); // //计算每个乘机人的手续费 // List<Tb_Ticket_Passenger> pasList = GetPassengerList(PassengerList, mOrder); // foreach (Tb_Ticket_Passenger item in pasList) // { // if (item.TGQHandlingFee > 0) // re = true; // temp += item.TGQHandlingFee + "/"; // } // temp = temp.TrimEnd('/'); // if (re) // { // //有手续费 // //记录日志 // content = "手续费:" + temp; // } // } // #endregion // result = orderBll.OperOrderTFGSHZ(mOrder, mUser, mCompany, content); // } // #endregion // msg = result == true ? "操作成功!" : "操作失败"; // } // catch (Exception ex) // { // msg = "处理出错"; // } // Page.ClientScript.RegisterStartupScript(this.GetType(), DateTime.Now.Ticks.ToString(), "showdialogOne('" + msg + "','OrderTGQList.aspx?currentuserid=" + this.currentuserid.Value.ToString() + "');", true); //} /// <summary> /// 获取乘机人信息 /// </summary> /// <returns></returns> public List <Tb_Ticket_Passenger> GetPassengerList(List <Tb_Ticket_Passenger> pasList, Tb_Ticket_Order Order) { if (Order != null && pasList != null && pasList.Count > 0) { //decimal TotalTGQHandlingFee = Order.TGQHandlingFee; decimal TotalTGQHandlingFee = 0; int Count = RepPassenger.Items.Count; for (int i = 0; i < Count; i++) { System.Web.UI.HtmlControls.HtmlInputText input = RepPassenger.Items[i].FindControl("txtTGQHandlingFee") as System.Web.UI.HtmlControls.HtmlInputText; System.Web.UI.HtmlControls.HtmlInputHidden Hid_Id = RepPassenger.Items[i].FindControl("Hid_Id") as System.Web.UI.HtmlControls.HtmlInputHidden; if (Hid_Id != null) { string id = Hid_Id.Value; Tb_Ticket_Passenger PasModel = pasList.Find(delegate(Tb_Ticket_Passenger _pas) { return(_pas.id.ToString() == id); }); if (PasModel != null) { if (input != null) { decimal TGQHandlingFee = 0; if (decimal.TryParse(input.Value, out TGQHandlingFee)) { PasModel.TGQHandlingFee = TGQHandlingFee; TotalTGQHandlingFee += TGQHandlingFee; } } } } } Order.TGQHandlingFee = TotalTGQHandlingFee; } return(pasList); }
protected override void AttachChildControls() { int activityid; int.TryParse(System.Web.HttpContext.Current.Request.QueryString.Get("activityid"), out activityid); PrizeRecordInfo userPrizeRecord = VshopBrowser.GetUserPrizeRecord(activityid); this.litPrizeLevel = (System.Web.UI.WebControls.Literal) this.FindControl("litPrizeLevel"); if (userPrizeRecord != null) { this.litPrizeLevel.Text = userPrizeRecord.Prizelevel; } Member member = HiContext.Current.User as Member; if (member != null) { this.txtName = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtName"); this.txtPhone = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtPhone"); this.txtName.Value = member.RealName; this.txtPhone.Value = member.CellPhone; } PageTitle.AddSiteNameTitle("中奖记录"); }
protected override void AttachChildControls() { this.rptLeaveComments = (ThemedTemplatedRepeater)this.FindControl("rptLeaveComments"); this.pager = (Pager)this.FindControl("pager"); this.txtTitle = (System.Web.UI.WebControls.TextBox) this.FindControl("txtTitle"); this.txtUserName = (System.Web.UI.WebControls.TextBox) this.FindControl("txtUserName"); this.txtContent = (System.Web.UI.WebControls.TextBox) this.FindControl("txtContent"); this.btnRefer = ButtonManager.Create(this.FindControl("btnRefer")); this.spLeaveUserName = (System.Web.UI.HtmlControls.HtmlControl) this.FindControl("spLeaveUserName"); this.spLeavePsw = (System.Web.UI.HtmlControls.HtmlControl) this.FindControl("spLeavePsw"); this.spLeaveReg = (System.Web.UI.HtmlControls.HtmlControl) this.FindControl("spLeaveReg"); this.txtLeaveUserName = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtLeaveUserName"); this.txtLeavePsw = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtLeavePsw"); this.txtLeaveCode = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtLeaveCode"); this.btnRefer.Click += new System.EventHandler(this.btnRefer_Click); PageTitle.AddSiteNameTitle("客户留言"); if (HiContext.Current.User.UserRole == UserRole.Member) { this.txtUserName.Text = HiContext.Current.User.Username; this.txtLeaveUserName.Value = string.Empty; this.txtLeavePsw.Value = string.Empty; this.spLeaveUserName.Visible = false; this.spLeavePsw.Visible = false; this.spLeaveReg.Visible = false; this.btnRefer.Text = "发表"; } else { this.spLeaveUserName.Visible = true; this.spLeavePsw.Visible = true; this.spLeaveReg.Visible = true; this.btnRefer.Text = "登录并留言"; } this.txtLeaveCode.Value = string.Empty; this.BindList(); }
protected override void SetValueByquery(HtmlInputText control, string query) { if (XYECOM.Core.XYRequest.GetQueryString(query) != "") control.Value = XYECOM.Core.XYRequest.GetQueryString(query); }
private void AddInputTextControlCell(TableRow row, string controlId, string cssClass, bool disabled) { using (TableCell cell = new TableCell()) { using (HtmlInputText targetControl = new HtmlInputText()) { targetControl.ID = controlId; targetControl.Attributes.Add("class", cssClass); if (disabled) { targetControl.Attributes.Add("readonly", "readonly"); } cell.Controls.Add(targetControl); } row.Controls.Add(cell); } }
private void Dispose(bool disposing) { if (!disposing) { return; } if (this.accountOverviewTab != null) { this.accountOverviewTab.Dispose(); this.accountOverviewTab = null; } if (this.headerLiteral != null) { this.headerLiteral.Dispose(); this.headerLiteral = null; } if (this.itemCodeInputText != null) { this.itemCodeInputText.Dispose(); this.itemCodeInputText = null; } if (this.itemSelect != null) { this.itemSelect.Dispose(); this.itemSelect = null; } if (this.storeSelect != null) { this.storeSelect.Dispose(); this.storeSelect = null; } if (this.selectedValuesHidden != null) { this.selectedValuesHidden.Dispose(); this.selectedValuesHidden = null; } if (this.showButton != null) { this.showButton.Dispose(); this.showButton = null; } if (this.statementGridView != null) { this.statementGridView.Dispose(); this.statementGridView = null; } if (this.toDateTextBox != null) { this.toDateTextBox.Dispose(); this.toDateTextBox = null; } this.disposed = true; }
private void AddItemCodeField(HtmlGenericControl container) { using (HtmlGenericControl field = HtmlControlHelper.GetField()) { using (HtmlGenericControl label = HtmlControlHelper.GetLabel(Titles.ItemCode, "ItemCodeInputText")) { field.Controls.Add(label); } this.itemCodeInputText = new HtmlInputText(); this.itemCodeInputText.ID = "ItemCodeInputText"; field.Controls.Add(this.itemCodeInputText); container.Controls.Add(field); } }
protected void btnSave_Click(object sender, System.EventArgs e) { string projectCode = Request["ProjectCode"] + ""; try { EntityData allCost = DAL.EntityDAO.CBSDAO.GetCBSByProject(projectCode); foreach (RepeaterItem li in this.repeat1.Items) { System.Web.UI.HtmlControls.HtmlInputText txtSortID = (HtmlInputText)li.FindControl("txtSortID"); System.Web.UI.HtmlControls.HtmlInputText txtCostAllocationDescription = (HtmlInputText)li.FindControl("txtCostAllocationDescription"); System.Web.UI.HtmlControls.HtmlInputText txtDescription = (HtmlInputText)li.FindControl("txtDescription"); RmsPM.Web.UserControls.InputSubject ucInputSubject = (RmsPM.Web.UserControls.InputSubject)li.FindControl("ucInputSubject"); string costCode = ((HtmlInputHidden)li.FindControl("txtCostCode")).Value; string costName = ((HtmlInputHidden)li.FindControl("txtCostName")).Value; string sortID = txtSortID.Value.Trim(); if (sortID == "") { Response.Write(Rms.Web.JavaScript.Alert(true, costName + ": 必须填写费用项编号 !")); return; } string subjectCode = ucInputSubject.Value.Trim(); if (subjectCode != "") { string subjectName = BLL.SubjectRule.GetSubjectName(subjectCode, base.SubjectSetCode); if (subjectName == "") { Response.Write(Rms.Web.JavaScript.Alert(true, costName + ": 不存在这个科目编号 !")); return; } } DataRow[] drs = allCost.CurrentTable.Select(String.Format("CostCode='{0}'", costCode)); if (drs.Length > 0) { int iChildCount = (int)drs[0]["ChildCount"]; // 明细节点项要对应科目 if (iChildCount == 0 && subjectCode == "") { Response.Write(Rms.Web.JavaScript.Alert(true, costName + ": 明细费用项要对应到科目 !")); return; } drs[0]["SortID"] = sortID; drs[0]["SubjectCode"] = subjectCode; drs[0]["CostAllocationDescription"] = txtCostAllocationDescription.Value; drs[0]["Description"] = txtDescription.Value; } } DAL.EntityDAO.CBSDAO.UpdateCBS(allCost); allCost.Dispose(); Response.Write(JavaScript.ScriptStart); Response.Write(JavaScript.Alert(false, "批量修改完成 !")); Response.Write(JavaScript.OpenerReload(false)); Response.Write("window.close();"); Response.Write(JavaScript.ScriptEnd); Response.End(); } catch (Exception ex) { ApplicationLog.WriteLog(this.ToString(), ex, ""); } }
protected void GrdOffering_RowUpdating(object sender, GridViewUpdateEventArgs e) { Label lblId = (Label)GrdOffering.Rows[e.RowIndex].FindControl("lblId"); TextBox txtName = (TextBox)GrdOffering.Rows[e.RowIndex].FindControl("txtName"); TextBox txtShortName = (TextBox)GrdOffering.Rows[e.RowIndex].FindControl("txtShortName"); TextBox txtDescr = (TextBox)GrdOffering.Rows[e.RowIndex].FindControl("txtDescr"); DropDownList ddlOfferingType = (DropDownList)GrdOffering.Rows[e.RowIndex].FindControl("ddlOfferingType"); DropDownList ddlField = (DropDownList)GrdOffering.Rows[e.RowIndex].FindControl("ddlField"); DropDownList ddlOfferingPatientSubcategory = (DropDownList)GrdOffering.Rows[e.RowIndex].FindControl("ddlOfferingPatientSubcategory"); DropDownList ddlNumClinicVisitsAllowedPerYear = (DropDownList)GrdOffering.Rows[e.RowIndex].FindControl("ddlNumClinicVisitsAllowedPerYear"); DropDownList ddlOfferingInvoiceType = (DropDownList)GrdOffering.Rows[e.RowIndex].FindControl("ddlOfferingInvoiceType"); CheckBox chkIsGstExempt = (CheckBox)GrdOffering.Rows[e.RowIndex].FindControl("chkIsGstExempt"); TextBox txtDefaultPrice = (TextBox)GrdOffering.Rows[e.RowIndex].FindControl("txtDefaultPrice"); DropDownList ddlServiceTimeMinutes = (DropDownList)GrdOffering.Rows[e.RowIndex].FindControl("ddlServiceTimeMinutes"); DropDownList ddlMaxNbrClaimable = (DropDownList)GrdOffering.Rows[e.RowIndex].FindControl("ddlMaxNbrClaimable"); DropDownList ddlMaxNbrClaimableMonths = (DropDownList)GrdOffering.Rows[e.RowIndex].FindControl("ddlMaxNbrClaimableMonths"); TextBox txtMedicareCompanyCode = (TextBox)GrdOffering.Rows[e.RowIndex].FindControl("txtMedicareCompanyCode"); TextBox txtDvaCompanyCode = (TextBox)GrdOffering.Rows[e.RowIndex].FindControl("txtDvaCompanyCode"); TextBox txtTacCompanyCode = (TextBox)GrdOffering.Rows[e.RowIndex].FindControl("txtTacCompanyCode"); TextBox txtMedicareCharge = (TextBox)GrdOffering.Rows[e.RowIndex].FindControl("txtMedicareCharge"); TextBox txtDvaCharge = (TextBox)GrdOffering.Rows[e.RowIndex].FindControl("txtDvaCharge"); TextBox txtTacCharge = (TextBox)GrdOffering.Rows[e.RowIndex].FindControl("txtTacCharge"); DropDownList ddlReminderLetterMonthsLaterToSend = (DropDownList)GrdOffering.Rows[e.RowIndex].FindControl("ddlReminderLetterMonthsLaterToSend"); DropDownList ddlReminderLetter = (DropDownList)GrdOffering.Rows[e.RowIndex].FindControl("ddlReminderLetter"); CheckBox chkUseCustomColour = (CheckBox)GrdOffering.Rows[e.RowIndex].FindControl("chkUseCustomColour"); System.Web.UI.HtmlControls.HtmlInputText ColorPicker = (System.Web.UI.HtmlControls.HtmlInputText)GrdOffering.Rows[e.RowIndex].FindControl("ColorPicker"); if (Convert.ToInt32(ddlReminderLetterMonthsLaterToSend.SelectedValue) > 0 && Convert.ToInt32(ddlReminderLetter.SelectedValue) == -1) { SetErrorMessage("For reminder letters - you must either set the number of months as disabled or select a reminder letter."); return; } Offering offering = OfferingDB.GetByID(Convert.ToInt32(lblId.Text)); // if logged not AC system, set as was // if logged not Clinic system, set as was // these are hidden in the gui also in method 'GrdOffering_RowCreated' int offeringPatientSubcategoryID = !UserView.GetInstance().IsAgedCareView ? offering.AgedCarePatientType.ID : Convert.ToInt32(ddlOfferingPatientSubcategory.SelectedValue); OfferingDB.Update(Convert.ToInt32(lblId.Text), Convert.ToInt32(ddlOfferingType.SelectedValue), Convert.ToInt32(ddlField.SelectedValue), offeringPatientSubcategoryID, Convert.ToInt32(ddlNumClinicVisitsAllowedPerYear.SelectedValue), Convert.ToInt32(ddlOfferingInvoiceType.SelectedValue), txtName.Text, txtShortName.Text, txtDescr.Text, chkIsGstExempt.Checked, Convert.ToDecimal(txtDefaultPrice.Text), Convert.ToInt32(ddlServiceTimeMinutes.Text), Convert.ToInt32(ddlMaxNbrClaimable.SelectedValue), Convert.ToInt32(ddlMaxNbrClaimableMonths.SelectedValue), txtMedicareCompanyCode.Text.Trim(), txtDvaCompanyCode.Text.Trim(), txtTacCompanyCode.Text.Trim(), Convert.ToDecimal(txtMedicareCharge.Text), Convert.ToDecimal(txtDvaCharge.Text), Convert.ToDecimal(txtTacCharge.Text), offering.PopupMessage, Convert.ToInt32(ddlReminderLetterMonthsLaterToSend.SelectedValue), Convert.ToInt32(ddlReminderLetter.SelectedValue), chkUseCustomColour.Checked, ColorPicker.Value ); Session["OfferingColors"] = OfferingDB.GetColorCodes(); GrdOffering.EditIndex = -1; FillGrid(); }
protected void GrdOffering_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.Equals("Insert")) { TextBox txtName = (TextBox)GrdOffering.FooterRow.FindControl("txtNewName"); TextBox txtShortName = (TextBox)GrdOffering.FooterRow.FindControl("txtNewShortName"); TextBox txtDescr = (TextBox)GrdOffering.FooterRow.FindControl("txtNewDescr"); DropDownList ddlOfferingType = (DropDownList)GrdOffering.FooterRow.FindControl("ddlNewOfferingType"); DropDownList ddlField = (DropDownList)GrdOffering.FooterRow.FindControl("ddlNewField"); DropDownList ddlOfferingPatientSubcategory = (DropDownList)GrdOffering.FooterRow.FindControl("ddlNewOfferingPatientSubcategory"); DropDownList ddlNumClinicVisitsAllowedPerYear = (DropDownList)GrdOffering.FooterRow.FindControl("ddlNewNumClinicVisitsAllowedPerYear"); DropDownList ddlOfferingInvoiceType = (DropDownList)GrdOffering.FooterRow.FindControl("ddlNewOfferingInvoiceType"); CheckBox chkIsGstExempt = (CheckBox)GrdOffering.FooterRow.FindControl("chkNewIsGstExempt"); TextBox txtDefaultPrice = (TextBox)GrdOffering.FooterRow.FindControl("txtNewDefaultPrice"); DropDownList ddlServiceTimeMinutes = (DropDownList)GrdOffering.FooterRow.FindControl("ddlNewServiceTimeMinutes"); DropDownList ddlMaxNbrClaimable = (DropDownList)GrdOffering.FooterRow.FindControl("ddlNewMaxNbrClaimable"); DropDownList ddlMaxNbrClaimableMonths = (DropDownList)GrdOffering.FooterRow.FindControl("ddlNewMaxNbrClaimableMonths"); TextBox txtMedicareCompanyCode = (TextBox)GrdOffering.FooterRow.FindControl("txtNewMedicareCompanyCode"); TextBox txtDvaCompanyCode = (TextBox)GrdOffering.FooterRow.FindControl("txtNewDvaCompanyCode"); TextBox txtTacCompanyCode = (TextBox)GrdOffering.FooterRow.FindControl("txtNewTacCompanyCode"); TextBox txtMedicareCharge = (TextBox)GrdOffering.FooterRow.FindControl("txtNewMedicareCharge"); TextBox txtDvaCharge = (TextBox)GrdOffering.FooterRow.FindControl("txtNewDvaCharge"); TextBox txtTacCharge = (TextBox)GrdOffering.FooterRow.FindControl("txtNewTacCharge"); DropDownList ddlReminderLetterMonthsLaterToSend = (DropDownList)GrdOffering.FooterRow.FindControl("ddlNewReminderLetterMonthsLaterToSend"); DropDownList ddlReminderLetter = (DropDownList)GrdOffering.FooterRow.FindControl("ddlNewReminderLetter"); CheckBox chkUseCustomColour = (CheckBox)GrdOffering.FooterRow.FindControl("chkNewUseCustomColour"); System.Web.UI.HtmlControls.HtmlInputText ColorPicker = (System.Web.UI.HtmlControls.HtmlInputText)GrdOffering.FooterRow.FindControl("NewColorPicker"); if (Convert.ToInt32(ddlReminderLetterMonthsLaterToSend.SelectedValue) > 0 && Convert.ToInt32(ddlReminderLetter.SelectedValue) == -1) { SetErrorMessage("For reminder letters - you must either set the number of months as disabled or select a reminder letter."); return; } // if logged not AC system, set AC patient subcat as 1 (--Not Aged Care--) // if logged not Clinic system, set clinic visit type as -1 (--Not Clinic--) // these are hidden in the gui also in method 'GrdOffering_RowCreated' int offeringPatientSubcategoryID = !UserView.GetInstance().IsAgedCareView ? 1 : Convert.ToInt32(ddlOfferingPatientSubcategory.SelectedValue); OfferingDB.Insert(Convert.ToInt32(ddlOfferingType.SelectedValue), Convert.ToInt32(ddlField.SelectedValue), offeringPatientSubcategoryID, Convert.ToInt32(ddlNumClinicVisitsAllowedPerYear.SelectedValue), Convert.ToInt32(ddlOfferingInvoiceType.SelectedValue), txtName.Text, txtShortName.Text, txtDescr.Text, chkIsGstExempt.Checked, Convert.ToDecimal(txtDefaultPrice.Text), Convert.ToInt32(ddlServiceTimeMinutes.Text), Convert.ToInt32(ddlMaxNbrClaimable.SelectedValue), Convert.ToInt32(ddlMaxNbrClaimableMonths.SelectedValue), txtMedicareCompanyCode.Text.Trim(), txtDvaCompanyCode.Text.Trim(), txtTacCompanyCode.Text.Trim(), Convert.ToDecimal(txtMedicareCharge.Text), Convert.ToDecimal(txtDvaCharge.Text), Convert.ToDecimal(txtTacCharge.Text), "", Convert.ToInt32(ddlReminderLetterMonthsLaterToSend.SelectedValue), Convert.ToInt32(ddlReminderLetter.SelectedValue), chkUseCustomColour.Checked, ColorPicker.Value ); Session["OfferingColors"] = OfferingDB.GetColorCodes(); FillGrid(); } if (e.CommandName.Equals("_Delete") || e.CommandName.Equals("_UnDelete")) { int offering_id = Convert.ToInt32(e.CommandArgument); try { if (e.CommandName.Equals("_Delete")) { OfferingDB.UpdateInactive(offering_id); } else { OfferingDB.UpdateActive(offering_id); } } catch (ForeignKeyConstraintException fkcEx) { if (Utilities.IsDev()) { SetErrorMessage("Can not delete because other records depend on this : " + fkcEx.Message); } else { SetErrorMessage("Can not delete because other records depend on this"); } } FillGrid(); } if (e.CommandName.Equals("SetAsBookingScreenDefaultService")) { int offering_id = Convert.ToInt32(e.CommandArgument); SystemVariableDB.Update("BookingScreenDefaultServiceID", offering_id.ToString()); FillGrid(); } }
protected override void AttachChildControls() { Member member = HiContext.Current.User as Member; if (member == null) { SiteSettings masterSettings = SettingsManager.GetMasterSettings(true); this.WriteError("跳转到通用登陆接口", ""); if (!string.IsNullOrEmpty(masterSettings.WeixinLoginUrl)) { this.Page.Response.Redirect(masterSettings.WeixinLoginUrl); return; } this.Page.Response.Redirect("Login.aspx?returnUrl=" + Globals.UrlEncode(HttpContext.Current.Request.Url.ToString())); return; } bool rest = MemberProcessor.CheckUserIsVerify(member.UserId); if (!rest) { this.Page.Response.Redirect("IdentityVerifi.aspx?type=submit&buyAmount=" + this.Page.Request.QueryString["buyAmount"] + "&productSku=" + this.Page.Request.QueryString["productSku"] + "&from=" + this.Page.Request.QueryString["from"]); return; } PageTitle.AddSiteNameTitle("订单确认"); this.litShipTo = (System.Web.UI.WebControls.Literal) this.FindControl("litShipTo"); this.litCellPhone = (System.Web.UI.WebControls.Literal) this.FindControl("litCellPhone"); this.litAddress = (System.Web.UI.WebControls.Literal) this.FindControl("litAddress"); this.rptCartProducts = (VshopTemplatedRepeater)this.FindControl("rptCartProducts"); this.dropCoupon = (Common_CouponSelect)this.FindControl("dropCoupon"); this.litOrderTotal = (System.Web.UI.WebControls.Literal) this.FindControl("litOrderTotal"); this.litPromotionPrice = (System.Web.UI.WebControls.Literal) this.FindControl("litPromotionPrice"); this.groupbuyHiddenBox = (System.Web.UI.HtmlControls.HtmlInputControl) this.FindControl("groupbuyHiddenBox"); this.rptAddress = (VshopTemplatedRepeater)this.FindControl("rptAddress"); this.selectShipTo = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("selectShipTo"); this.regionId = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("regionId"); this.litProductTotalPrice = (System.Web.UI.WebControls.Literal) this.FindControl("litProductTotalPrice"); this.rptPromotions = (VshopTemplatedRepeater)this.FindControl("rptPromotions"); this.litTotalTax = (System.Web.UI.WebControls.Literal) this.FindControl("litTotalTax"); this.litToalFreight = (System.Web.UI.WebControls.Literal) this.FindControl("litToalFreight"); this.litTotalQuantity = (System.Web.UI.WebControls.Literal) this.FindControl("litTotalQuantity"); this.isCustomsClearance = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("isCustomsClearance"); this.txtmemberIdentityCard = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtmemberIdentityCard"); this.txtRealName = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtRealName"); this.htmlIsCanMergeOrder = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("htmlIsCanMergeOrder"); this.txtVoucherCode = (HtmlInputText)this.FindControl("txtVoucherCode"); this.txtVoucherPwd = (HtmlInputText)this.FindControl("txtVoucherPwd"); this.dropVoucher = (Common_VoucherSelect)this.FindControl("dropVoucher"); // 现金券列表 this.litAddressNotExits = (System.Web.UI.WebControls.Literal) this.FindControl("litAddressNotExits"); this.rptCartProducts.ItemDataBound += rptCartProducts_ItemDataBound; System.Collections.Generic.IList <ShippingAddressInfo> shippingAddresses = MemberProcessor.GetShippingAddresses(); this.rptAddress.DataSource = from item in shippingAddresses orderby item.IsDefault select item; this.rptAddress.DataBind(); ShippingAddressInfo shippingAddressInfo = shippingAddresses.FirstOrDefault((ShippingAddressInfo item) => item.IsDefault); if (shippingAddressInfo == null) { shippingAddressInfo = ((shippingAddresses.Count > 0) ? shippingAddresses[0] : null); } if (shippingAddressInfo != null) { this.litShipTo.Text = shippingAddressInfo.ShipTo + "(收)"; this.litCellPhone.Text = shippingAddressInfo.CellPhone; this.litAddress.Text = RegionHelper.GetFullRegion(shippingAddressInfo.RegionId, "") + " " + shippingAddressInfo.Address; this.selectShipTo.SetWhenIsNotNull(shippingAddressInfo.ShippingId.ToString()); this.regionId.SetWhenIsNotNull(shippingAddressInfo.RegionId.ToString()); this.txtRealName.Value = shippingAddressInfo.ShipTo; DataTable dt = SitesManagementHelper.GetMySubMemberByUserId(HiContext.Current.User.UserId); if (dt != null && dt.Rows.Count > 0) { this.txtmemberIdentityCard.Value = dt.Rows[0]["IdentityCard"].ToString(); this.txtRealName.Value = dt.Rows[0]["RealName"].ToString(); } this.litAddressNotExits.Text = "<div class=\"addr-con\" id=\"addr-con\"><a href=\"/vshop/ShippingAddresses.aspx?returnUrl=" + HttpContext.Current.Request.Url.AbsoluteUri + "\" id=\"addressurl\"><p><label id=\"lbAddress\">" + RegionHelper.GetFullRegion(shippingAddressInfo.RegionId, "") + " " + shippingAddressInfo.Address + "</label></p>" + "<div class=\"rec-info fix\"> <label id=\"lbShipTo\">" + shippingAddressInfo.ShipTo + "(收)" + "</label><span class=\"ml10\"><label id=\"lbCellPhone\">" + shippingAddressInfo.CellPhone + "</label></span></div></a></div>"; } else { this.litAddressNotExits.Text = "<div class=\"no-addr\" id=\"no-addr\"> <span class=\"n-tip\">亲,您当前没有收货地址哦!</span> <a class=\"add-addr-btn\" href=\"/vshop/AddShippingAddress.aspx\">添加新地址</a> </div>"; } //if (shippingAddresses == null || shippingAddresses.Count == 0) //{ // this.Page.Response.Redirect(Globals.ApplicationPath + "/Vshop/AddShippingAddress.aspx?returnUrl=" + Globals.UrlEncode(System.Web.HttpContext.Current.Request.Url.ToString())); // return; //} if (int.TryParse(this.Page.Request.QueryString["buyAmount"], out this.buyAmount) && !string.IsNullOrEmpty(this.Page.Request.QueryString["productSku"]) && !string.IsNullOrEmpty(this.Page.Request.QueryString["from"]) && (this.Page.Request.QueryString["from"] == "signBuy" || this.Page.Request.QueryString["from"] == "groupBuy")) { this.productSku = this.Page.Request.QueryString["productSku"]; int storeId = 0; int.TryParse(this.Page.Request.QueryString["storeId"], out storeId); if (int.TryParse(this.Page.Request.QueryString["groupbuyId"], out this.groupBuyId)) { this.groupbuyHiddenBox.SetWhenIsNotNull(this.groupBuyId.ToString()); shoppingCartInfo = ShoppingCartProcessor.GetGroupBuyShoppingCart(this.productSku, this.buyAmount, storeId); } else { shoppingCartInfo = ShoppingCartProcessor.GetShoppingCart(this.productSku, this.buyAmount, storeId); } } else { if (int.TryParse(this.Page.Request.QueryString["buyAmount"], out this.buyAmount) && !string.IsNullOrEmpty(this.Page.Request.QueryString["productSku"]) && !string.IsNullOrEmpty(this.Page.Request.QueryString["from"]) && this.Page.Request.QueryString["from"] == "countDown") { this.productSku = this.Page.Request.QueryString["productSku"]; int storeId = 0; int.TryParse(this.Page.Request.QueryString["storeId"], out storeId); if (int.TryParse(this.Page.Request.QueryString["countDownId"], out this.countDownId)) { this.groupbuyHiddenBox.SetWhenIsNotNull(this.countDownId.ToString()); shoppingCartInfo = ShoppingCartProcessor.GetCountDownShoppingCart(this.productSku, this.buyAmount, storeId); } else { shoppingCartInfo = ShoppingCartProcessor.GetShoppingCart(this.productSku, this.buyAmount, storeId); } } else { //shoppingCartInfo = ShoppingCartProcessor.GetShoppingCart(); HttpCookie cookieSkuIds = this.Page.Request.Cookies["UserSession-SkuIds"]; if (cookieSkuIds != null && !string.IsNullOrEmpty(cookieSkuIds.Value)) { shoppingCartInfo = ShoppingCartProcessor.GetPartShoppingCartInfo(Globals.UrlDecode(cookieSkuIds.Value));//获取未用户选择的商品 } else { shoppingCartInfo = ShoppingCartProcessor.GetShoppingCart(); } if (shoppingCartInfo != null && shoppingCartInfo.GetQuantity() == 0) { //this.buytype = "0"; } } } if (shoppingCartInfo != null) { this.rptCartProducts.DataSource = shoppingCartInfo.LineItems; this.rptCartProducts.DataBind(); decimal totalAmount = shoppingCartInfo.GetNewTotal(); //shoppingCartInfo.GetTotal(); this.dropCoupon.CartTotal = totalAmount; this.dropVoucher.CartTotal = totalAmount; System.Collections.Generic.List <System.Collections.Generic.KeyValuePair <string, string> > list = new System.Collections.Generic.List <System.Collections.Generic.KeyValuePair <string, string> >(); if (shoppingCartInfo.IsReduced) { list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.Reduced), shoppingCartInfo.ReducedPromotionName + string.Format(" 优惠:{0}", shoppingCartInfo.ReducedPromotionAmount.ToString("F2")))); } if (shoppingCartInfo.IsFreightFree) { list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.FullAmountSentFreight), string.Format("{0}", shoppingCartInfo.FreightFreePromotionName))); } if (shoppingCartInfo.IsSendTimesPoint) { list.Add(new System.Collections.Generic.KeyValuePair <string, string>(PromotionHelper.GetShortName(PromoteType.FullAmountSentTimesPoint), string.Format("{0}:送{1}倍", shoppingCartInfo.SentTimesPointPromotionName, shoppingCartInfo.TimesPoint.ToString("F2")))); } if (this.groupBuyId == 0) { this.rptPromotions.DataSource = list; this.rptPromotions.DataBind(); } Member currentUser = HiContext.Current.User as Member; #region 是否存在清关商品标识 bool isOneTemplateId = true; int templateId = 0; StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < shoppingCartInfo.LineItems.Count; i++) { if (i == (shoppingCartInfo.LineItems.Count - 1)) { stringBuilder.Append(shoppingCartInfo.LineItems[i].ProductId); } else { stringBuilder.AppendFormat("{0},", shoppingCartInfo.LineItems[i].ProductId); } if (i == 0) { templateId = shoppingCartInfo.LineItems[i].TemplateId; } else { if (templateId != shoppingCartInfo.LineItems[i].TemplateId) { isOneTemplateId = false; } } } bool b = ShoppingProcessor.CheckIsCustomsClearance(stringBuilder.ToString()); if (b) { this.isCustomsClearance.Value = "1";//表示存在需要清关的商品 } else { this.isCustomsClearance.Value = "0"; } #endregion decimal tax = 0m;//输出税费+运费 decimal freight = 0m; bool flag = groupBuyId > 0; int totalQuantity = 0; //Dictionary<int, decimal> dictShippingMode = new Dictionary<int, decimal>(); foreach (ShoppingCartItemInfo item in shoppingCartInfo.LineItems) { totalQuantity += item.Quantity; tax += item.AdjustedPrice * item.TaxRate * item.Quantity; #region 弃用代码 //if ((!shoppingCartInfo.IsFreightFree ||!item.IsfreeShipping|| flag)) //{ // if (item.TemplateId > 0) // { // if (dictShippingMode.ContainsKey(item.TemplateId)) // { // dictShippingMode[item.TemplateId] += item.Weight * item.Quantity; // } // else // { // dictShippingMode.Add(item.TemplateId, item.Weight * item.Quantity); // } // } //} } //foreach (var item in dictShippingMode)//模拟分单,计算运费 //{ // ShippingModeInfo shippingMode = ShoppingProcessor.GetShippingMode(item.Key); // freight += ShoppingProcessor.CalcFreight(shippingAddressInfo.RegionId, item.Value, shippingMode); //} #endregion if (shippingAddressInfo != null) { freight = ShoppingCartProcessor.GetFreight(shoppingCartInfo, shippingAddressInfo.RegionId, false); //ShoppingProcessor.CalcShoppingCartFreight(shoppingCartInfo, shippingAddressInfo.RegionId); } #region 判断是否符合单条件 this.htmlIsCanMergeOrder.Value = "0"; if (templateId != 0 && isOneTemplateId && tax <= 50) { bool IsCanMergeOrder = ShoppingProcessor.CheckIsCanMergeOrder(templateId, tax, currentUser == null ? 0 : currentUser.UserId); this.htmlIsCanMergeOrder.Value = IsCanMergeOrder ? "1" : "0"; } #endregion //this.litTotalTax.Text =(tax<50?"0.00":tax.ToString("F2")); decimal totaltax = shoppingCartInfo.GetNewTotalTax(); this.litTotalTax.Text = totaltax.ToString("F2"); string strToalFreight = freight == 0 ? "0.00" : freight.ToString("F2"); if (shoppingCartInfo.LineItems.Count != shoppingCartInfo.LineItems.Count((ShoppingCartItemInfo a) => a.IsfreeShipping) && !shoppingCartInfo.IsFreightFree) { this.litToalFreight.Text = "<span id='showfreight'>" + strToalFreight + "</span>"; totaltax = totaltax < 50 ? 0 : totaltax; this.litOrderTotal.Text = (shoppingCartInfo.GetNewTotal() + totaltax + freight).ToString("F2");//总额=商品调整后价格+运费+税费 -活动优惠 } else { this.litToalFreight.Text = "<span id='showfreight' style='text-decoration: line-through;'>" + strToalFreight + "</span>"; totaltax = totaltax < 50 ? 0 : totaltax; this.litOrderTotal.Text = (shoppingCartInfo.GetNewTotal() + totaltax).ToString("F2");//总额=商品调整后价格+运费+税费 -活动优惠 } this.litProductTotalPrice.Text = shoppingCartInfo.GetTotal().ToString("F2"); //tax=tax<50?0:tax; //totaltax = totaltax < 50 ? 0 : totaltax; //this.litOrderTotal.Text = (shoppingCartInfo.GetNewTotal() + totaltax + freight).ToString("F2");//总额=商品调整后价格+运费+税费 -活动优惠 //活动优惠 this.litPromotionPrice.Text = shoppingCartInfo.GetActivityPrice().ToString("F2"); this.litTotalQuantity.Text = totalQuantity.ToString(); } }
protected override void AttachChildControls() { DistributorsInfo nowCurrentDistributors = DistributorsBrower.GetNowCurrentDistributors(Globals.GetCurrentMemberUserId()); MemberInfo currentMember = MemberProcessor.GetCurrentMember(); if (nowCurrentDistributors.ReferralStatus != 0) { System.Web.HttpContext.Current.Response.Redirect("MemberCenter.aspx"); } else { PageTitle.AddSiteNameTitle("申请提现"); this.accoutType = (System.Web.UI.HtmlControls.HtmlSelect) this.FindControl("accoutType"); this.litmaxmoney = (System.Web.UI.WebControls.Literal) this.FindControl("litmaxmoney"); SiteSettings masterSettings = SettingsManager.GetMasterSettings(true); if (masterSettings.DrawPayType.Contains("0")) { this.accoutType.Items.Add(new System.Web.UI.WebControls.ListItem("微信钱包", "0")); } if (masterSettings.DrawPayType.Contains("1")) { this.accoutType.Items.Add(new System.Web.UI.WebControls.ListItem("支付宝", "1")); } if (masterSettings.DrawPayType.Contains("2")) { this.accoutType.Items.Add(new System.Web.UI.WebControls.ListItem("线下转帐", "2")); } System.Web.UI.WebControls.Literal literal = (System.Web.UI.WebControls.Literal) this.FindControl("litAlipayBtn"); literal.Text = "display:none"; if (masterSettings.DrawPayType.Contains("3")) { literal.Text = ""; } this.txtAccountName = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtAccountName"); this.txtaccount = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtaccount"); this.txtmoney = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtmoney"); this.txtmoneyweixin = (System.Web.UI.HtmlControls.HtmlInputText) this.FindControl("txtmoneyweixin"); this.hidmoney = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("hidmoney"); this.requestcommission = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("requestcommission"); this.requestcommission1 = (System.Web.UI.HtmlControls.HtmlAnchor) this.FindControl("requestcommission1"); this.txtaccount.Value = nowCurrentDistributors.RequestAccount; this.txtAccountName.Value = currentMember.RealName; decimal referralBlance = nowCurrentDistributors.ReferralBlance; this.litmaxmoney.Text = referralBlance.ToString("F2"); decimal num = 0m; if (decimal.TryParse(SettingsManager.GetMasterSettings(false).MentionNowMoney, out num) && num > 0m) { this.txtmoney.Attributes["placeholder"] = "请输入大于等于" + num + "元的金额"; this.txtmoneyweixin.Attributes["placeholder"] = "最低提现金额" + num + "元的金额"; this.hidmoney.Value = num.ToString(); } if (DistributorsBrower.IsExitsCommionsRequest()) { this.requestcommission.Disabled = true; this.requestcommission.InnerText = "您的申请正在审核当中"; this.requestcommission1.Disabled = true; this.requestcommission1.InnerText = "您的申请正在审核当中"; literal.Text = "display:none"; System.Web.UI.WebControls.Literal literal2 = (System.Web.UI.WebControls.Literal) this.FindControl("litWechatBtn"); literal2.Text = "display:none"; } else { this.requestcommission.Attributes.Add("onclick", "return RequestCommissions(3)"); this.requestcommission1.Attributes.Add("onclick", "return RequestCommissions(1)"); } } }
/// <summary> /// Request Object Form Value /// </summary> /// <param name="FormObject">WebControls, HtmlControls</param> /// <param name="sDefaultValue"></param> /// <returns>String</returns> public static string rf(object FormObject, string sDefaultValue = null) { string sRet = sDefaultValue; if (FormObject != null) { try { TextBox obj = (TextBox)FormObject; sRet = obj.Text; } catch { } finally { } try { System.Web.UI.HtmlControls.HtmlInputText obj = (System.Web.UI.HtmlControls.HtmlInputText)FormObject; sRet = obj.Value; } catch { } try { System.Web.UI.HtmlControls.HtmlInputHidden obj = (System.Web.UI.HtmlControls.HtmlInputHidden)FormObject; sRet = obj.Value; } catch { } try { System.Web.UI.HtmlControls.HtmlTextArea obj = (System.Web.UI.HtmlControls.HtmlTextArea)FormObject; sRet = obj.InnerText; } catch { } try { DropDownList obj = (DropDownList)FormObject; sRet = obj.SelectedItem.Value; } catch { } try { System.Web.UI.HtmlControls.HtmlSelect obj = (System.Web.UI.HtmlControls.HtmlSelect)FormObject; sRet = obj.Value; } catch { } try { RadioButtonList obj = (RadioButtonList)FormObject; sRet = obj.SelectedItem.Value; } catch { } try { System.Web.UI.HtmlControls.HtmlInputCheckBox obj = (System.Web.UI.HtmlControls.HtmlInputCheckBox)FormObject; sRet = obj.Value; } catch { } try { System.Web.UI.HtmlControls.HtmlInputRadioButton obj = (System.Web.UI.HtmlControls.HtmlInputRadioButton)FormObject; sRet = obj.Value; } catch { } } return(sRet); }