Пример #1
0
    protected void RadTreeView_Toolbox_NodeDrop(object sender, Telerik.Web.UI.RadTreeNodeDragDropEventArgs e)
    {
        RadTreeNode sourceNode = e.SourceDragNode;

        if (e.HtmlElementID != null)
        {
            PlaceHolder   myPlaceHolder = (PlaceHolder)Page.Master.FindControl("PlaceHolder_DesignMode");
            HtmlInputText _currentPlaceholderPosition = (HtmlInputText)myPlaceHolder.FindControl("currentPlaceholderPosition");
            HtmlInputText _currentZoneTB = (HtmlInputText)myPlaceHolder.FindControl("currentZoneTB");

            int dockCurrentPos = int.Parse(_currentPlaceholderPosition.Value);

            MasterPageEditorMgr myMasterPageEditorMgr = new MasterPageEditorMgr();

            RadDockLayout myDockLayout = (RadDockLayout)this.Page.Master.FindControl("RadDockLayout_DesignMode");

            RadDock myDock = myMasterPageEditorMgr.Add_DesignMode_NewControl(this.Page, myMasterPage_Lock, sourceNode, _currentZoneTB.Value, dockCurrentPos);

            myDockLayout.Controls.Add(myDock);

            ScriptManager.RegisterStartupScript(
                myDock,
                this.GetType(),
                "AddDock",
                string.Format(@"function _addDock() {{  
            Sys.Application.remove_load(_addDock);  
            $find('{1}').dock($find('{0}'),{2});   
            $find('{0}').doPostBack('DockPositionChanged');   
            }};  
            Sys.Application.add_load(_addDock);", myDock.ClientID, _currentZoneTB.Value, dockCurrentPos),
                true);

            CreateSaveStateTrigger(myDock);
        }
    }
Пример #2
0
        // ---------------------- General   ------------------------------ //

        protected void Cambiar_Fecha(object Sender, EventArgs e)
        {
            string ind = ((System.Web.UI.WebControls.Calendar)Sender).ID;

            string[] partes = ind.Split('_');
            ((TextBox)phForm.FindControl("param_" + partes[partes.Length - 1])).Text = ((System.Web.UI.WebControls.Calendar)Sender).SelectedDate.ToString("yyyy-MM-dd");
        }
Пример #3
0
        /// <summary>
        /// Return whether an item is new or popular and display its associated image or text in recipedetail page.
        /// </summary>
        public static void GetIdentifyItemNewPopular(DateTime strDate, PlaceHolder ph, int Popular)
        {
            //Find controls
            Label PopularLabel = (Label)(ph.FindControl("lblpopular"));
            Image thumbsupimg  = (Image)(ph.FindControl("thumbsup"));
            Image Newimage     = (Image)(ph.FindControl("newimg"));

            //Get thumbs up image - indicate that the item is hot or popular.
            ShowPopularImage(Popular, PopularLabel, thumbsupimg);

            //Get new image if item is less than or equal to 7 days old
            ShowNewImage(DateTime.Now.Subtract(strDate), Newimage);
        }
        /// <summary>
        /// Loads the top-level buckets for a page. There can only be one instance of a particular bucket on a page.
        /// </summary>
        /// <param name="bucketName">the name of the bucket control (ex. "header.ascx")</param>
        /// <param name="embeddableID">the ID of the embeddable we need to load as a plugin</param>
        private void LoadBuckets(string bucketName, int embeddableID)
        {
            Control bucket = _page.LoadControl("~/core/buckets/" + bucketName);

            bucket.ID = bucketName.Replace(".ascx", "");
            if (_cmsControls.FindControl(bucket.ID) == null)
            {
                _cmsControls.Controls.Add(bucket);
            }
            if (embeddableID > 0)
            {
                LoadEmbeddables(bucketName, embeddableID);
            }
        }
Пример #5
0
        string GetChekcedReservationBarcodes()
        {
            string strBarcodeList = "";

            PlaceHolder reservation = (PlaceHolder)this.FindControl("reservation");

            for (int i = 0; i < this.ReservationLineCount; i++)
            {
                CheckBox checkbox = (CheckBox)reservation.FindControl("reservation_line" + Convert.ToString(i) + "checkbox");
                if (checkbox.Checked == true)
                {
                    if (this.ReservationBarcodes.Count <= i)
                    {
                        //this.SetReservationDebugInfo("ReservationBarcodes失效...");
                        //return null;

                        // text-level: 内部错误
                        throw new Exception("ReservationBarcodes失效...");
                    }
                    string strBarcode = this.ReservationBarcodes[i];

                    if (strBarcodeList != "")
                    {
                        strBarcodeList += ",";
                    }
                    strBarcodeList  += strBarcode;
                    checkbox.Checked = false;
                }
            }

            return(strBarcodeList);
        }
Пример #6
0
        protected void BtnNewOrderClick(object sender, EventArgs e)
        {
            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "loadpharm", "parent.ShowLoading()", true);
            Session["IsFirstLoad"] = "true";
            Page        mp  = (Page)this.Parent.Page;
            PlaceHolder ph  = (PlaceHolder)mp.FindControl("phForms");
            UpdatePanel upt = (UpdatePanel)mp.FindControl("updtForms");

            Session["CurrentFormName"] = "frmLabOrderTouch";

            Touch.Custom_Forms.frmLabOrderTouch fr = (frmLabOrderTouch)mp.LoadControl("frmLabOrderTouch.ascx");

            fr.ID = "ID" + Session["CurrentFormName"].ToString();
            frmLabOrderTouch theFrm = (frmLabOrderTouch)ph.FindControl("ID" + Session["CurrentFormName"].ToString());

            foreach (Control item in ph.Controls)
            {
                ph.Controls.Remove(item);
                //item.Visible = false;
            }

            if (theFrm != null)
            {
                theFrm.Visible = true;
            }
            else
            {
                ph.Controls.Add(fr);
            }
            ph.DataBind();
            upt.Update();
            mp.ClientScript.RegisterStartupScript(mp.GetType(), "settabschild", "setTabs();");
        }
Пример #7
0
        public OptionSelection ParseFromPlaceholder(Option baseOption, PlaceHolder ph, string prefix = null)
        {
            var result = new OptionSelection();

            result.OptionBvin = baseOption.Bvin;

            foreach (var o in baseOption.Items)
            {
                if (!o.IsLabel)
                {
                    var radioId = "opt" + prefix + o.Bvin.Replace("-", string.Empty);
                    var rb      = (HtmlInputRadioButton)ph.FindControl(radioId);
                    if (rb != null)
                    {
                        if (rb.Checked)
                        {
                            result.SelectionData = o.Bvin;
                            return(result);
                        }
                    }
                }
            }

            return(result);
        }
Пример #8
0
        public void Edit_Product_Properties(PlaceHolder myPlaceHolder, string Product_VariantID, string ProductID)
        {
            Variant myVariant = Get_Product_Variant(Product_VariantID);

            if (!DataEval.IsEmptyQuery(myVariant.Table_Name) && myVariant.Table_Name != "None")
            {
                List <e2Data> UpdateData = new List <e2Data>();

                // Add Product ID
                UpdateData.Add(new e2Data("ProductID", ProductID));

                // Add dynamic data
                List <Variant_Property> myVariant_Properties = Get_Product_Variant_Properties(Product_VariantID);

                // Find Control
                Table myTable = (Table)myPlaceHolder.FindControl("Table_Product_Property");

                foreach (Variant_Property myVariant_Property in myVariant_Properties)
                {
                    Control myControl = myTable.FindControl(myVariant_Property.Variant_PropertyID);

                    if (myControl != null)
                    {
                        UpdateData.Add(new e2Data(myVariant_Property.Field_Name, Get_Control_Value(myControl, myVariant_Property.Input_Option)));
                    }
                }

                Edit_Product_Detail(UpdateData, myVariant.Table_Name);
            }
        }
Пример #9
0
        public OptionSelection ParseFromPlaceholder(Option baseOption, PlaceHolder ph, string prefix = null)
        {
            var result = new OptionSelection();

            result.OptionBvin = baseOption.Bvin;

            var optionBvins = new List <string>();

            foreach (var o in baseOption.Items)
            {
                if (!o.IsLabel)
                {
                    var checkId = "opt" + prefix + o.Bvin.Replace("-", string.Empty);
                    var cb      = (HtmlInputCheckBox)ph.FindControl(checkId);
                    if (cb != null && cb.Checked)
                    {
                        optionBvins.Add(o.Bvin);
                    }
                }
            }

            result.SelectionData = string.Join(",", optionBvins);

            return(result);
        }
Пример #10
0
        public void SetSelectionsInPlaceholder(Option baseOption, PlaceHolder ph, OptionSelectionList selections)
        {
            if (ph == null)
            {
                return;
            }
            if (selections == null)
            {
                return;
            }
            var val = selections.FindByOptionId(baseOption.Bvin);

            if (val == null)
            {
                return;
            }

            var ddl = (System.Web.UI.WebControls.DropDownList)ph.FindControl("opt" + baseOption.Bvin.Replace("-", string.Empty));

            if (ddl != null)
            {
                if (ddl.Items.FindByValue(val.SelectionData) != null)
                {
                    ddl.ClearSelection();
                    ddl.Items.FindByValue(val.SelectionData).Selected = true;
                }
            }
        }
Пример #11
0
        //declared as virtual so that sub classes would be able to hookup
        //with the mechanism and make custom binding a field in a grid view.
        //The method works in tandem with the GetTemplatedControls method
        protected virtual void Bind(object sender, EventArgs e)
        {
            PlaceHolder ph   = (PlaceHolder)sender;
            GridViewRow dgi  = (GridViewRow)ph.NamingContainer;
            WebControl  ctrl = (WebControl)ph.FindControl(Id);

            if (column.IsStatic)
            {
                SetValue(ctrl, column.Text);
            }
            else
            {
                if (column.IsLookup)
                {
                    object oValue      = DataBinder.Eval(dgi.DataItem, column.Text);
                    object lookupValue = null;
                    try
                    {
                        lookupValue = lookup.GetLookup(column.Lookup)[oValue];
                    }
                    catch (Exception ex)
                    {
                        throw new Exception("Item not found for the lookup for " + column.Name + ".", ex);
                    }
                    SetValue(ctrl,
                             ((oValue != null) ? lookupValue :
                              oValue));
                }
                else
                {
                    SetValue(ctrl, DataBinder.Eval(dgi.DataItem, column.Text));
                }
            }
        }
Пример #12
0
 protected virtual void InitControls()
 {
     foreach (We7Control ctr in Panel.EditInfo.Controls)
     {
         PlaceHolder c = UIHelper.GetControl <PlaceHolder>("_" + ctr.ID, this);
         if (c != null && c.FindControl(ctr.ID) == null)
         {
             c.Controls.Clear();
             c.Controls.Add(UIHelper.GetControl(ctr));
         }
         else
         {
             if (Page.Form != null && Page.Form.FindControl(ctr.ID) == null)
             {
                 if (this.Controls.Contains(Page.Form))
                 {
                     Page.Form.Controls.Add(UIHelper.GetControl(ctr));
                 }
                 else
                 {
                     this.Controls.Add(UIHelper.GetControl(ctr));
                 }
                 //Page.Form.Controls.Add(UIHelper.GetControl(ctr));
             }
         }
     }
 }
Пример #13
0
        protected void LabSummaryPage()
        {
            Session["IsFirstLoad"] = "true";
            Page        mp  = (Page)this.Parent.Page;
            PlaceHolder ph  = (PlaceHolder)mp.FindControl("phForms");
            UpdatePanel upt = (UpdatePanel)mp.FindControl("updtForms");

            Session["CurrentFormName"] = "frmLaboratoryTouch";

            Touch.Custom_Forms.frmLaboratoryTouch fr = (frmLaboratoryTouch)mp.LoadControl("~/Touch/Custom Forms/frmLaboratoryTouch.ascx");

            fr.ID = "ID" + Session["CurrentFormName"].ToString();
            frmLaboratoryTouch theFrm = (frmLaboratoryTouch)ph.FindControl("ID" + Session["CurrentFormName"].ToString());

            foreach (Control item in ph.Controls)
            {
                ph.Controls.Remove(item);
                //item.Visible = false;
            }

            if (theFrm != null)
            {
                theFrm.Visible = true;
            }
            else
            {
                ph.Controls.Add(fr);
            }
            ph.DataBind();
            upt.Update();
            mp.ClientScript.RegisterStartupScript(mp.GetType(), "settabschild", "setTabs();");
        }
Пример #14
0
        public void SetSelectionsInPlaceholder(Option baseOption, PlaceHolder ph, OptionSelectionList selections)
        {
            if (ph == null)
            {
                return;
            }
            if (selections == null)
            {
                return;
            }
            var val = selections.FindByOptionId(baseOption.Bvin);

            if (val == null)
            {
                return;
            }

            var vals = val.SelectionData.Split(',');

            foreach (var s in vals)
            {
                var checkId = string.Concat("opt", s.Replace("-", string.Empty));
                var cb      = (HtmlInputCheckBox)ph.FindControl(checkId);
                if (cb != null)
                {
                    cb.Checked = true;
                }
            }
        }
Пример #15
0
        public void SetSelectionsInPlaceholder(Option baseOption, PlaceHolder ph, OptionSelectionList selections)
        {
            if (ph == null)
            {
                return;
            }
            if (selections == null)
            {
                return;
            }
            var val = selections.FindByOptionId(baseOption.Bvin);

            if (val == null)
            {
                return;
            }

            var radioId = "opt" + val.SelectionData.Replace("-", string.Empty);
            var rb      = (HtmlInputRadioButton)ph.FindControl(radioId);

            if (rb != null)
            {
                rb.Checked = true;
            }
        }
Пример #16
0
        void SetInfo(string strText)
        {
            PlaceHolder    line = (PlaceHolder)FindControl("infoline");
            LiteralControl text = (LiteralControl)line.FindControl("infotext");

            text.Text = strText;
        }
        protected void DigitalGoodsGrid_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item)
            {
                OrderItemDigitalGood oidg = (OrderItemDigitalGood)e.Item.DataItem;
                if (oidg != null)
                {
                    DigitalGood dg = oidg.DigitalGood;
                    if (dg != null)
                    {
                        if ((dg.LicenseAgreement != null) || (dg.Readme != null))
                        {
                            PlaceHolder phAssets = (PlaceHolder)e.Item.FindControl("phAssets");
                            if (phAssets != null)
                            {
                                phAssets.Visible = true;
                                string encodedUrl        = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes("javascript:window.close()"));
                                string agreeUrl          = this.Page.ResolveUrl(NavigationHelper.GetMobileStoreUrl("~/ViewLicenseAgreement.aspx") + "?id={0}&ReturnUrl=" + encodedUrl);
                                string agreeClickScript  = AbleCommerce.Code.PageHelper.GetPopUpScript(agreeUrl, "license", 640, 480, "resizable=1,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no") + ";return false";
                                string readmeUrl         = this.Page.ResolveUrl(NavigationHelper.GetMobileStoreUrl("~/ViewReadme.aspx")) + "?ReadmeId={0}&ReturnUrl=" + encodedUrl;
                                string readmeClickScript = AbleCommerce.Code.PageHelper.GetPopUpScript(readmeUrl, "readme", 640, 480, "resizable=1,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no") + ";return false";
                                if (dg.Readme != null)
                                {
                                    readmeClickScript = string.Format(readmeClickScript, dg.ReadmeId);

                                    HtmlControl ReadMeItem = (HtmlControl)phAssets.FindControl("ReadMeItem");
                                    HtmlControl ReadMeLink = (HtmlControl)ReadMeItem.FindControl("ReadMeLink");
                                    ReadMeItem.Visible = true;
                                    ReadMeLink.Attributes["onclick"] = readmeClickScript;
                                }
                                if (dg.LicenseAgreement != null)
                                {
                                    agreeClickScript = string.Format(agreeClickScript, dg.LicenseAgreementId);

                                    HtmlControl AgreementItem = (HtmlControl)phAssets.FindControl("AgreementItem");
                                    HtmlControl AgreementLink = (HtmlControl)AgreementItem.FindControl("AgreementLink");
                                    AgreementItem.Visible               = true;
                                    AgreementLink.Attributes["href"]    = string.Format(agreeUrl, dg.LicenseAgreementId);
                                    AgreementLink.Attributes["onclick"] = agreeClickScript;
                                }
                            }
                        }
                    }
                }
            }
        }
Пример #18
0
        /// <summary>
        /// Find The HTML Element Inside The HTML Controls, Inside The User Control, Inside The Page And Change The Css Property Of It.
        /// </summary>
        /// <param name="page">Page</param>
        /// <param name="userControlID">UserControlID</param>
        /// <param name="htmlControlID">HTML ControlID</param>
        /// <param name="elementID">Element ID</param>
        /// <param name="key"> Css Tag</param>
        /// <param name="value">Value</param>
        public void ChangeCss(Page page, string userControlID, string htmlControlID, string elementID, string key, string value)
        {
            PlaceHolder        pchWhole = page.FindControl(userControlID) as PlaceHolder;
            UserControl        uc       = pchWhole.FindControl(htmlControlID) as UserControl;
            HtmlGenericControl div      = uc.FindControl(elementID) as HtmlGenericControl;

            div.Attributes.Add(key, value);
        }
Пример #19
0
        //The method is overriden so that the commandargument of the linkbutton
        //is set with the value of the Key field of the view
        protected override void Bind(object sender, EventArgs e)
        {
            base.Bind(sender, e);
            PlaceHolder ph  = (PlaceHolder)sender;
            GridViewRow dgi = (GridViewRow)ph.NamingContainer;
            LinkButton  lnk = (LinkButton)ph.FindControl(Id);

            lnk.CommandArgument = DataBinder.Eval(dgi.DataItem, column.Key).ToString();
        }
Пример #20
0
        void SetDebugInfo(string strText)
        {
            PlaceHolder line = (PlaceHolder)FindControl("debugline");

            line.Visible = true;

            LiteralControl text = (LiteralControl)line.FindControl("debugtext");

            text.Text = strText;
        }
Пример #21
0
        private void UlozAtrakce()
        {
            using (SqlConnection pripojeni = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["SuxPubConnectionString"].ConnectionString))
            {
                pripojeni.Open();
                string dotaz = "DELETE FROM AtrakceCon WHERE pubId=@pubId";

                using (SqlCommand prikaz = new SqlCommand(dotaz, pripojeni))
                {
                    prikaz.Parameters.AddWithValue("@pubId", pubId);
                    prikaz.ExecuteNonQuery();
                }


                PlaceHolder phAtrakce = (PlaceHolder)FormView1.FindControl("PlaceHolderAtrakce");

                foreach (DataRow radek in dtAtrakce.Rows)
                {
                    CheckBox cb = (CheckBox)phAtrakce.FindControl("cb_" + radek[0]);

                    if (cb.Checked)
                    {
                        TextBox tbPoznamka = (TextBox)phAtrakce.FindControl("komentar_" + radek[0]);



                        dotaz = "INSERT INTO AtrakceCon (atrakceId, pubId, poznamka) VALUES ( @atrakceId, @pubId,@poznamka)";

                        using (SqlCommand prikaz = new SqlCommand(dotaz, pripojeni))
                        {
                            prikaz.Parameters.AddWithValue("@atrakceId", radek[0]);
                            prikaz.Parameters.AddWithValue("@pubId", pubId);
                            prikaz.Parameters.AddWithValue("@poznamka", tbPoznamka.Text);
                            prikaz.ExecuteNonQuery();
                        }
                    }
                }


                pripojeni.Close();
            }
        }
Пример #22
0
        protected void rdneworder_Click(object sender, EventArgs e)
        {
            //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "loadpharm", "parent.ShowLoading()", true);
            Session["IsFirstLoad"] = "true";
            Page        mp  = (Page)this.Parent.Page;
            PlaceHolder ph  = (PlaceHolder)mp.FindControl("phForms");
            UpdatePanel upt = (UpdatePanel)mp.FindControl("updtForms");

            Session["CurrentFormName"] = "frmPharmacyTouch";
            Session["Refill"]          = "0";
            Session["Visit_id"]        = "0";
            Touch.Custom_Forms.frmPharmacyTouch fr = (frmPharmacyTouch)mp.LoadControl("~/Touch/Custom Forms/frmPharmacyTouch.ascx");
            Session["Orderid"] = 0;
            Session["Mode"]    = "newARV";
            fr.ID = "ID" + Session["CurrentFormName"].ToString();
            frmVisitTouch theFrm = (frmVisitTouch)ph.FindControl("ID" + Session["CurrentFormName"].ToString());

            // Handle Save button
            HiddenField Phf  = (HiddenField)mp.FindControl("hdSaveBtnVal");
            UpdatePanel updt = (UpdatePanel)mp.FindControl("updtPatientSave");

            Phf.Value = fr.ID + "_btnSave_input";
            updt.Update();
            RadScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "shwSve", "$('#divSave').css('display', 'block');", true);

            // END

            foreach (Control item in ph.Controls)
            {
                ph.Controls.Remove(item);
                //item.Visible = false;
                //if (item.ID == "ID" + Session["CurrentFormName"].ToString())
                //{
                //    item.Visible = true;
                //}
                //item.Visible = false;
            }

            if (theFrm != null)
            {
                theFrm.Visible = true;
            }
            else
            {
                ph.Controls.Add(fr);
            }
            //ph.DataBind();
            upt.Update();
            mp.ClientScript.RegisterStartupScript(mp.GetType(), "settabschild", "setTabs();");
        }
Пример #23
0
        /// <summary>
        /// Updates the lava fields template dictionary from controls.
        /// </summary>
        /// <param name="phLavaFieldsControls">The ph lava fields controls.</param>
        /// <param name="lavaFieldsTemplateDictionary">The lava fields template dictionary.</param>
        /// <returns></returns>
        public static Dictionary <string, string> UpdateLavaFieldsTemplateDictionaryFromControls(PlaceHolder phLavaFieldsControls, Dictionary <string, string> lavaFieldsTemplateDictionary)
        {
            foreach (var item in lavaFieldsTemplateDictionary.ToList())
            {
                // If this is a postback, there will be a control that holds the value
                var lavaValueControl = phLavaFieldsControls.FindControl("lavaValue_" + item.Key) as RockTextBox;
                if (lavaValueControl != null && lavaValueControl.Text != item.Value)
                {
                    lavaFieldsTemplateDictionary[item.Key] = lavaValueControl.Text;
                }
            }

            return(lavaFieldsTemplateDictionary);
        }
        protected void rgviewpharmacyform_ItemCommand(object sender, GridCommandEventArgs e)
        {
            GridDataItem item1      = (GridDataItem)e.Item;
            string       strOrderID = item1.GetDataKeyValue("OrderID").ToString();
            string       strrefill  = item1["NextAction"].Text;

            Session["Refill"]   = strrefill;
            Session["Visit_id"] = item1["visitid"].Text.ToString();

            //ScriptManager.RegisterStartupScript(Page, Page.GetType(), "loadpharm", "parent.ShowLoading()", true);
            Session["IsFirstLoad"] = "true";
            Page        mp  = (Page)this.Parent.Page;
            PlaceHolder ph  = (PlaceHolder)mp.FindControl("phForms");
            UpdatePanel upt = (UpdatePanel)mp.FindControl("updtForms");

            Session["CurrentFormName"] = "frmPharmacyTouch";

            Touch.Custom_Forms.frmPharmacyTouch fr = (frmPharmacyTouch)mp.LoadControl("~/Touch/Custom Forms/frmPharmacyTouch.ascx");
            Session["Orderid"] = Convert.ToInt32(strOrderID);
            fr.ID = "ID" + Session["CurrentFormName"].ToString();
            frmVisitTouch theFrm = (frmVisitTouch)ph.FindControl("ID" + Session["CurrentFormName"].ToString());

            // Handle Save button
            HiddenField Phf  = (HiddenField)mp.FindControl("hdSaveBtnVal");
            UpdatePanel updt = (UpdatePanel)mp.FindControl("updtPatientSave");

            Phf.Value = fr.ID + "_btnSave_input";
            updt.Update();
            RadScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "shwSve", "$('#divSave').css('display', 'block');", true);

            // END
            foreach (Control item in ph.Controls)
            {
                ph.Controls.Remove(item);
                //item.Visible = false;
            }

            if (theFrm != null)
            {
                theFrm.Visible = true;
            }
            else
            {
                ph.Controls.Add(fr);
            }
            //ph.DataBind();
            upt.Update();
            mp.ClientScript.RegisterStartupScript(mp.GetType(), "settabschild", "setTabs();");
        }
Пример #25
0
        public OptionSelection ParseFromPlaceholder(Option baseOption, PlaceHolder ph, string prefix = null)
        {
            var result = new OptionSelection();

            result.OptionBvin = baseOption.Bvin;

            var li = (LiteralControl)ph.FindControl("opt" + prefix + baseOption.Bvin.Replace("-", string.Empty));

            if (li != null)
            {
                result.SelectionData = li.Text.Trim();
            }

            return(result);
        }
Пример #26
0
        public OptionSelection ParseFromPlaceholder(Option baseOption, PlaceHolder ph, string prefix = null)
        {
            var result = new OptionSelection();

            result.OptionBvin = baseOption.Bvin;

            var tb = (TextBox)ph.FindControl(string.Concat("opt", prefix, baseOption.Bvin.Replace("-", string.Empty)));

            if (tb != null)
            {
                result.SelectionData = tb.Text.Trim();
            }

            return(result);
        }
 protected void LoadStringVatTuToControls(string sVatTu, PlaceHolder dsVatTu)
 {
     if (sVatTu != "")
     {
         string[] aVatTu = sVatTu.Substring(1, sVatTu.Length - 2).Split(new string[] { "@@" }, StringSplitOptions.RemoveEmptyEntries);
         foreach (string VatTuGroup in aVatTu)
         {
             string[] aVatTuGroup = VatTuGroup.Split(new char[] { '/' });
             Control  txtVatTu    = dsVatTu.FindControl(aVatTuGroup[0]);
             if (txtVatTu != null)
             {
                 ((TextBox)txtVatTu).Text = aVatTuGroup[1];
             }
         }
     }
 }
Пример #28
0
        static void Item_DataBinding(object sender, System.EventArgs e)
        {
            PlaceHolder  ph = (PlaceHolder)sender;
            RepeaterItem ri = (RepeaterItem)ph.NamingContainer;
            Label        lb = (Label)ph.FindControl("item1");

            lb.Text    = DataBinder.Eval(ri.DataItem, "Name").ToString();
            lb.ToolTip = DataBinder.Eval(ri.DataItem, "ToolTip").ToString();
            DataRowView drv = (DataRowView)ri.DataItem;

            if (drv.Row.ItemArray.Length == 8)//团队
            {
                lb.Attributes.Add("tid", drv["TMRPID"].ToString());
                lb.Text += string.Format("({0})", DataBinder.Eval(ri.DataItem, "LeaderName").ToString());
            }
        }
Пример #29
0
        public OptionSelection ParseFromPlaceholder(Option baseOption, PlaceHolder ph, string prefix = null)
        {
            var result = new OptionSelection();

            result.OptionBvin = baseOption.Bvin;

            var ddl =
                (System.Web.UI.WebControls.DropDownList)
                ph.FindControl("opt" + prefix + baseOption.Bvin.Replace("-", string.Empty));

            if (ddl != null && !string.IsNullOrEmpty(ddl.SelectedValue))
            {
                result.SelectionData = ddl.SelectedValue;
            }

            return(result);
        }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            List <MoneyBackEpisodeVo> moneyBackEpisodeList = new List <MoneyBackEpisodeVo>();
            MoneyBackEpisodeVo        moneyBackEpisodeVo;

            for (int i = 0; i < count; i++)
            {
                moneyBackEpisodeVo = new MoneyBackEpisodeVo();
                string paymentDate = (((TextBox)PlaceHolder.FindControl("txtPaymentDate" + i.ToString())).Text.ToString());
                moneyBackEpisodeVo.CIMBE_RepaymentDate = DateTime.Parse(paymentDate);
                string repaidPercent = (((TextBox)PlaceHolder.FindControl("txtRepaidPer" + i.ToString())).Text.ToString());
                moneyBackEpisodeVo.CIMBE_RepaidPer = float.Parse(repaidPercent);
                moneyBackEpisodeList.Add(moneyBackEpisodeVo);
            }
            Session["episodeList"] = moneyBackEpisodeList;
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "leftpane", "loadcontrol('PortfolioInsuranceEntry','none');", true);
        }