예제 #1
0
 public void GetExtensionFromFullNameDocument()
 {
     if (!string.IsNullOrWhiteSpace(DocName))
     {
         Extension = DocName.Substring(DocName.IndexOf('.'));
     }
 }
        void ReleaseDesignerOutlets()
        {
            if (DocName != null)
            {
                DocName.Dispose();
                DocName = null;
            }

            if (DocPath != null)
            {
                DocPath.Dispose();
                DocPath = null;
            }
        }
예제 #3
0
        public MultiSelModels(DocName main, IList <DocName> others)
        {
            InitializeComponent();


            // build the tree:
            TreeNode root = treeView1.Nodes.Add(main.Name);

            root.Tag = main;

            foreach (var other in others)
            {
                TreeNode link = root.Nodes.Add(other.Name);
                link.Tag = other;
            }
            root.Expand();
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["appid"] == null)
            {
                Response.Redirect("error.aspx");
            }
            else
            {
                sid            = Session["appid"].ToString();
                Appid.ReadOnly = true;
                Appid.Text     = sid;

                Service my = new Service();
                DataSet ds = new DataSet();
                ds = my.Doc_List();
                DocName.Items.Add("--Please Select State--");
                DocName.DataTextField  = ds.Tables[0].Columns["r_doctitle"].ToString(); // text field name of table dispalyed in dropdown
                DocName.DataValueField = ds.Tables[0].Columns["r_docid"].ToString();
                // to retrive specific  textfield name
                DocName.DataSource = ds.Tables[0];      //assigning datasource to the dropdownlist
                DocName.DataBind();
            }
        }