コード例 #1
0
        public ClassLookup()
        {
            _classes = new Dictionary <string, string>();

            XmlElement xmlClasses = QueryClass.GetClassList().GetContent().BaseElement;

            foreach (XmlElement each in xmlClasses.SelectNodes("Class"))
            {
                string className = each.SelectSingleNode("ClassName").InnerText;
                string classId   = each.GetAttribute("ID");

                _classes.Add(className, classId);
            }
        }
コード例 #2
0
 public PublicIPResolverOverDnsOptions(
     string query,
     QueryType type,
     QueryClass cls,
     List <IPAddress> ipv4NameServers,
     List <IPAddress> ipv6NameServers
     )
 {
     Query           = query;
     QueryType       = type;
     QueryClass      = cls;
     IPv4NameServers = ipv4NameServers;
     IPv6NameServers = ipv6NameServers;
 }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            postage = Request.QueryString["postage"];
            int index = Convert.ToInt32(postage);

            if (postage != null && !IsPostBack)
            {
                PostageOptions o = QueryClass.GetPostageOptionByName(postage);
                pricePostage.Text       = o.Price.ToString("F");
                namePostage.Text        = o.Name;
                descriptionPostage.Text = o.Description;
                etaPostage.Text         = o.ETA.ToString();
                hiddenID.Text           = o.ID.ToString();
            }
        }
コード例 #4
0
        protected void btnAddToCart_Click(object sender, EventArgs e)
        {
            //Checks to see if product which will be the number to get an item from a list is not null
            int productIndex = Convert.ToInt32(productID);

            List <Product> cart      = new List <Product>();
            bool           isCartNew = false;

            //gets the cart or sets a new one
            if (Session["cart"] == null)
            {
                isCartNew = true;
            }
            else
            {
                cart = (List <Product>)Session["cart"];
            }

            Product p = QueryClass.GetProduct(productIndex);;

            if (isCartNew)
            {
                cart.Add(p);
                Session.Add("cart", cart);
            }
            else
            {
                int positionIndex = -1;
                //find said product in the cart
                for (int i = 0; i < cart.Count; i++)
                {
                    if (cart[i].Name.Equals(p.Name))
                    {
                        positionIndex = i;
                    }
                }
                if (positionIndex == -1)
                {
                    cart.Add(p);
                }
                //if found, only adds item if there is enought stock
                else if (p.Stock > cart[positionIndex].Quantity)
                {
                    cart[positionIndex].Quantity += 1;
                }
                Session["cart"] = cart;
            }
        }
コード例 #5
0
        public DataSet RunRetrieveQueryEx()
        {
            QueryClass lcQuery;

            if (!String.IsNullOrEmpty(ActiveRow.RetrieveQuery))
            {
                lcQuery = new QueryClass(ActiveRow.RetrieveQuery, clConnectionMode);
                ReplaceQueryPlaceHolder(lcQuery);
                lcQuery.ReplaceDictionaryPlaceHolder(clFormParam);
                return(lcQuery.RunQueryEx());
            }
            else
            {
                return(null);
            }
        }
コード例 #6
0
        /*
         * 0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5
         +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
         |                                               |
         | /                                               /
         | /                      NAME                     /
         |                                               |
         +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
         |                      TYPE                     |
         +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
         |                     CLASS                     |
         +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
         |                      TTL                      |
         |                                               |
         +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
         |                   RDLENGTH                    |
         +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|
         | /                     RDATA                     /
         | /                                               /
         +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
         */

        public BaseResourceRecordInfo ReadRecordInfo(ArraySegment <byte> data)
        {
            IDnsString         domainName = _reader.ReadQuestionQueryString(data);                      // domain name
            ResourceRecordType recordType = (ResourceRecordType)_reader.ReadUInt16NetworkOrder(data);   // record type
            QueryClass         queryClass = (QueryClass)_reader.ReadUInt16NetworkOrder(data);           // query class
            int timeToLive    = (int)_reader.ReadUInt32NetworkOrder(data);                              // ttl - 32bit!!
            int rawDataLength = _reader.ReadUInt16NetworkOrder(data);                                   // RDLength

            return(new BaseResourceRecordInfo(
                       recordType,    // record type
                       queryClass,    // query class
                       timeToLive,    // ttl - 32bit!!
                       rawDataLength, // RDLength
                       domainName     // domain name
                       ));
        }
コード例 #7
0
        public bool InsertRecord()
        {
            QueryClass lcQuery;

            if (clNewRecord)
            {
                lcQuery = new QueryClass(QueryClass.QueryType.InsertSessionRow);
                lcQuery.ReplaceRowPlaceHolder(clActiveRow.Row);

                return(lcQuery.ExecuteNonQuery() > 0);
            }
            else
            {
                return(false);
            }
        }
コード例 #8
0
        private AppManifestRow GetAppManifestRow(String paSubscriptionID)
        {
            DataTable  lcDataTable;
            QueryClass lcQuery;

            lcQuery = new QueryClass(QueryClass.QueryType.GetAppManifestRow);
            lcQuery.ReplacePlaceHolder("$SUBSCRIPTIONID", paSubscriptionID, true);

            if (((lcDataTable = lcQuery.RunQuery()) != null) && (lcDataTable.Rows.Count > 0))
            {
                return(new AppManifestRow(lcDataTable.Rows[0]));
            }
            else
            {
                return(null);
            }
        }
コード例 #9
0
        static private FormInfoRow GetFormInfoRow(String paFormName)
        {
            QueryClass lcQuery;
            DataTable  lcDataTable;

            lcQuery = new QueryClass(QueryClass.QueryType.GetFormInfoRow);
            lcQuery.ReplacePlaceHolder("$FORMNAME", paFormName, true);

            if (((lcDataTable = lcQuery.RunQuery()) != null) && (lcDataTable.Rows.Count > 0))
            {
                return(new FormInfoRow(lcDataTable.Rows[0]));
            }
            else
            {
                return(null);
            }
        }
コード例 #10
0
        private void ChooseQuery(QueryType paQueryType)
        {
            switch (paQueryType)
            {
            case QueryType.GetPOSReceiptRow: clQueryClass = new QueryClass(ctGetPOSReceiptRow, clConnectionMode); break;

            case QueryType.GetPOSLastReceiptNo: clQueryClass = new QueryClass(ctGetPOSLastReceiptNo, clConnectionMode); break;

            case QueryType.GetPOSStakeHolderRowByStakeHolderID: clQueryClass = new QueryClass(ctGetPOSStakeHolderRowByStakeHolderID, clConnectionMode); break;

            case QueryType.GetPOSStakeHolderRowByCodeNo: clQueryClass = new QueryClass(ctGetPOSStakeHolderRowByCodeNo, clConnectionMode); break;

            case QueryType.POSUpdateReceipt: clQueryClass = new QueryClass(ctPOSUpdateReceipt, clConnectionMode); break;
            }

            clQueryClass.ReplacePlaceHolder("$SUBSCRIPTIONID", ApplicationFrame.GetInstance().ActiveSubscription.ActiveRow.SubscriptionID, true);
        }
コード例 #11
0
        protected static SessionRow GetSessionRow(String paSessionKey)
        {
            QueryClass lcQuery;
            DataTable  lcDataTable;

            lcQuery = new QueryClass(QueryClass.QueryType.GetSessionRowBySessionKey);
            lcQuery.ReplacePlaceHolder("$SESSIONKEY", paSessionKey, true);

            if (((lcDataTable = lcQuery.RunQuery()) != null) && (lcDataTable.Rows.Count > 0))
            {
                return(new SessionRow(lcDataTable.Rows[0]));
            }
            else
            {
                return(null);
            }
        }
コード例 #12
0
        protected void btnLogin_Click(object sender, System.EventArgs e)
        {
            string email = ((TextBox)FindControl("logEmail")).Text;
            string pword = ((TextBox)FindControl("logPassword")).Text;
            User   u     = QueryClass.GetUser(email, pword);

            if (u.ID != 0)
            {
                //User logged in
                Session.Add("user", u);
                Response.Redirect("Main");
            }
            else
            {
                ((Label)FindControl("errorMessage")).Visible = true;
            }
        }
コード例 #13
0
        private String[] RetrieveData(String paQueryString)
        {
            QueryClass lcQueryClass;
            DataTable  lcDataTable;

            if (!String.IsNullOrEmpty(paQueryString))
            {
                lcQueryClass = new QueryClass(paQueryString, QueryClass.ConnectionMode.EService);
                ApplicationFrame.GetInstance().ActiveFormInfoManager.ReplaceQueryPlaceHolder(lcQueryClass);

                if (((lcDataTable = lcQueryClass.RunQuery()) != null) && (lcDataTable.Rows.Count > 0))
                {
                    return(General.SingleDimensionStringArray(lcDataTable.Select(), lcDataTable.Columns[0].ColumnName));
                }
            }

            return(null);
        }
コード例 #14
0
        private int InsertOrderInfoRecord(OrderInfoRow paOrderInfoRow)
        {
            object     lcResult;
            int        lcOrderNo;
            QueryClass lcQuery;

            lcQuery = new QueryClass(QueryClass.QueryType.InsertOrderInfoRecord);
            lcQuery.ReplaceRowPlaceHolder(paOrderInfoRow.Row);

            if (((lcResult = lcQuery.GetResult()) != null) && ((lcOrderNo = Convert.ToInt32(lcResult)) > 0))
            {
                return(lcOrderNo);
            }
            else
            {
                return(-1);
            }
        }
コード例 #15
0
        protected static SessionRow GetSessionRow(String paSubscriptionID, String paLoginID)
        {
            QueryClass lcQuery;
            DataTable  lcDataTable;

            lcQuery = new QueryClass(QueryClass.QueryType.GetSessionRow);
            lcQuery.ReplacePlaceHolder("$SUBSCRIPTIONID", paSubscriptionID, true);
            lcQuery.ReplacePlaceHolder("$LOGINID", paLoginID, true);

            if (((lcDataTable = lcQuery.RunQuery()) != null) && (lcDataTable.Rows.Count > 0))
            {
                return(new SessionRow(lcDataTable.Rows[0]));
            }
            else
            {
                return(null);
            }
        }
コード例 #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            mode   = Request.QueryString["mode"];
            order  = Request.QueryString["order"];
            user   = Request.QueryString["user"];
            orders = QueryClass.GetOrders();
            int orderID = 0;

            try
            {
                orderID = Convert.ToInt32(order);
            }
            catch { }
            //toggles sent if mode is toggleSent and order exists in url
            if (mode != null && order != null)
            {
                if (mode.Equals("toggleSent"))
                {
                    //query for toggling sent

                    QueryClass.OrderToggleSent(orderID);
                    if (Request.QueryString["flagSingle"] != null)
                    {
                        orders = new List <Order>();
                        orders.Add(QueryClass.GetOrder(orderID));
                    }
                    else
                    {
                        orders = QueryClass.GetOrders();
                    }
                }
            }
            //populates a single order if order exists in url
            if (order != null && mode == null)
            {
                orders = new List <Order>();
                orders.Add(QueryClass.GetOrder(orderID));
            }
            //populates by user if there is a user url param
            if (user != null)
            {
                orders = QueryClass.GetOrdersByUser(user);
            }
        }
コード例 #17
0
        public bool UpdateData()
        {
            String     lcPlaceHolder;
            String     lcValue;
            QueryClass lcMasterQuery;
            QueryClass lcQueryClass;

            lcQueryClass  = null;
            lcMasterQuery = null;

            try
            {
                for (int lcCount = 0; lcCount < clDataList.Length; lcCount++)
                {
                    lcQueryClass = new QueryClass(clUpdateQuery, clConnectionMode);
                    ApplicationFrame.GetInstance().ActiveFormInfoManager.ReplaceQueryPlaceHolder(lcQueryClass);

                    foreach (dynamic lcKey in clDataList[lcCount].Keys)
                    {
                        lcPlaceHolder = "$" + lcKey.ToUpper();
                        lcValue       = Convert.ToString(clDataList[lcCount][lcKey]);

                        lcQueryClass.ReplacePlaceHolder(lcPlaceHolder, lcValue, true);
                    }

                    if (lcMasterQuery == null)
                    {
                        lcMasterQuery = lcQueryClass;
                    }
                    else
                    {
                        lcMasterQuery.SetInnerQuery(lcQueryClass);
                    }
                }

                lcMasterQuery.ExecuteNonQueryChain();
                return(true);
            }
            catch (Exception paException)
            {
                General.WriteExceptionLog(paException, "DATALISTUPDATE : " + ApplicationFrame.GetInstance().ActiveSubscription.ActiveRow.SubscriptionID);
                return(false);
            }
        }
コード例 #18
0
        private DataTable RetrieveData()
        {
            QueryClass lcQuery;

            if (!String.IsNullOrEmpty(clFormInfoRow.RetrieveQuery))
            {
                try
                {
                    lcQuery = new QueryClass(clFormInfoRow.RetrieveQuery, clConnectionMode);
                    lcQuery.ReplaceDictionaryPlaceHolder(clFormParam);
                    return(lcQuery.RunQuery());
                }
                catch (Exception paException)
                {
                    General.WriteExceptionLog(paException, "FORMINFOMANAGER.RETRIEVEDATA");
                }
            }
            return(null);
        }
コード例 #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Receive variable value from another page which is Products where products equals index of list products
            String productID = Request.QueryString["PassingValue"];
            int    id        = 0;

            try
            {
                id = Convert.ToInt32(productID);
            }
            catch { }
            p = QueryClass.GetProduct(id);

            //Change the information purchase product to equal the product at a certain index using 'product' variable
            productViewName.Text        = p.Name;
            productViewPrice.Text       = "Price: $" + p.Price.ToString("F");
            productViewDescription.Text = p.Description;
            productViewImage.ImageUrl   = p.Image;
        }
コード例 #20
0
        private Hashtable CurrentTests()
        {
            // Set up the query.
            Query psQuery = new QueryClass();

            psQuery.CountOnly         = false;
            psQuery.SelectionCriteria = QUERY_ACTIVE;
            psQuery.DatastoreItemType = PsDatastoreItemTypeEnum.psDatastoreItemTypeTestCase;

            DatastoreItemList psDataList = new DatastoreItemListClass();

            psDataList.Query     = psQuery;
            psDataList.Datastore = m_psDataStore;
            FieldDefinitions psFields = m_psDataStore.FieldDefinitions;

            // Add fields with the FieldDefinitions indexer
            psQuery.QueryFields.Clear();
            for (int fieldCount = 0; fieldCount < TEST_CASE_FIELDS.Length; fieldCount++)
            {
                psQuery.QueryFields.Add(psFields[TEST_CASE_FIELDS[fieldCount]]);
            }

            // Add fields to sort by
            for (int fieldCount = 0; fieldCount < TEST_CASE_SORT.Length; fieldCount++)
            {
                psQuery.QuerySortFields.Add(
                    psFields[TEST_CASE_SORT[fieldCount]],
                    PsSortTypeEnum.psSortTypeAscending);
            }

            Hashtable res = new Hashtable();

            psDataList.Execute();
            foreach (DatastoreItem psItem in psDataList.DatastoreItems)
            {
                object module   = psItem.Fields["Test Module"].Value;
                object suite    = psItem.Fields["Test Suite"].Value;
                object testcase = psItem.Fields["TestCase"].Value;
                res[TestKey(module, suite, testcase)] = psItem.Fields["ID"].Value;
            }
            return(res);
        }
コード例 #21
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            PostageOptions o = new PostageOptions();

            o.Price       = Convert.ToDouble(pricePostage.Text);
            o.Description = descriptionPostage.Text;
            o.Name        = namePostage.Text;
            o.ETA         = Convert.ToInt32(etaPostage.Text);
            // Add new postage option
            if (hiddenID.Text.Equals(""))
            {
                QueryClass.AddPostageOption(o);
            }
            else
            {
                //Update Postage
                QueryClass.UpdatePostageOption(o);
            }
            Response.Redirect("ManagePostage.aspx");
        }
コード例 #22
0
        private bool UpdatDataRecord(Dictionary <String, String> paActiveDataList)
        {
            QueryClass lcQuery;

            try
            {
                lcQuery = new QueryClass(clUpdateQuery, clConnectionMode);
                lcQuery.ReplaceDictionaryPlaceHolder(paActiveDataList);
                lcQuery.ReplacePlaceHolder("$COLUMNLIST", "N\'(" + paActiveDataList.GetData(ctKEYDataColumnList) + ")\'", false);
                lcQuery.ReplacePlaceHolder("$VALUELIST", BuildSQLValueString(paActiveDataList, ctKEYDataColumnList, ctComma), false);
                lcQuery.ReplacePlaceHolder("$UPDATEDATASTRING", BuildSQLColumnValueString(paActiveDataList, ctKEYDataColumnList, ctComma), false);
                lcQuery.ReplacePlaceHolder("$CONDITIONSTRING", BuildSQLColumnValueString(paActiveDataList, ctKEYKeyColumnList, " And "), false);

                return(lcQuery.ExecuteNonQuery() > 0);
            }
            catch (Exception paException)
            {
                General.WriteExceptionLog(paException, "UPDATEDATA : " + ApplicationFrame.GetInstance().ActiveSubscription.ActiveRow.SubscriptionID);
                return(false);
            }
        }
コード例 #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Get value of mode and product from when button is clicked to determine which button is clicked
            mode     = Request.QueryString["mode"];
            product  = Request.QueryString["product"];
            products = QueryClass.GetProductData();
            if (mode != null)
            {
                if (mode.Equals("DeleteItem"))
                {
                    //Delete an item depending on product which acts as index pointer
                    GlobalData.productList.RemoveAt(Convert.ToInt32(product));
                }

                if (mode.Equals("UpdateItem"))
                {
                    //Open up update page sending the product value so the correct product can be determined
                    Response.Redirect("Update.aspx?PassingValue=" + Server.UrlEncode(product));
                }
            }
        }
コード例 #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            mode  = Request.QueryString["mode"];
            order = Request.QueryString["order"];
            user  = Request.QueryString["user"];
            int i = 0;

            try { Convert.ToInt32(order); }
            catch { }
            if (mode == null && order != null)
            {
                orders = new List <Order>();
                orders.Add(QueryClass.GetOrder(i));
            }
            //if these are true, the user shouldnt be here
            if (user == null && order == null)
            {
                Response.Redirect("Main");
            }
            orders = QueryClass.GetOrdersByUser(user);
            if (mode != null && order != null)
            {
                if (mode.Equals("toggleSent"))
                {
                    try{ Convert.ToInt32(order); }
                    catch { }
                    //Change status of order if admin changes the status
                    QueryClass.OrderToggleSent(i);
                }
                if (Request.QueryString["flagSingle"] == null)
                {
                    orders = QueryClass.GetOrdersByUser(user);
                }
                else
                {
                    orders = new List <Order>();
                    orders.Add(QueryClass.GetOrder(i));
                }
            }
        }
コード例 #25
0
        private void cboClass_SelectedIndexChanged_1(object sender, EventArgs e)
        {
            OnValueChanged("RefClassID", cboClass.GetValue());
            //string seatNo = cboSeatNo.Text;
            //SetSeatNo(seatNo);
            cboSeatNo.Text = "";

            //if (cboClass.GetValue() == "")
            //    cboSeatNo.Enabled = false;
            //else
            GetClassSeatNoList(cboClass.GetValue());

            try
            {
                KeyValuePair <string, string> kv = ((KeyValuePair <string, string>)cboClass.SelectedItem);
                DSResponse rsp = QueryClass.GetClass(kv.Key);

                // (string.IsNullOrEmpty(cboDept.Text))
                cboDept.WatermarkText = rsp.GetContent().GetText("Class/Department");
            }
            catch { }
        }
コード例 #26
0
        protected void Page_Load(object sender, EventArgs e)

        {
            string mode  = Request.QueryString["mode"];
            string email = Request.QueryString["user"];

            users  = QueryClass.GetUsers();
            orders = QueryClass.GetOrders();
            if (mode != null)
            {
                //Suspend a user
                if (mode.Equals("toggleSuspend") && !((User)Session["user"]).Email.Equals(email))
                {
                    QueryClass.ToggleSuspendUser(email);
                }
                //Delete a user
                if (mode.Equals("delete") && !((User)Session["user"]).Email.Equals(email))
                {
                    QueryClass.ToggleDeleteUser(email);
                }
            }
        }
コード例 #27
0
        protected void updateConfirmBtn_Clicked(object sender, System.EventArgs e)
        {
            //Store updated values in variables
            string updateCategory    = productUpdateCategory.Text;
            string updateName        = productUpdateName.Text;
            int    updateStock       = Convert.ToInt32(productUpdateStock.Text);
            string updateDescription = productUpdateDescription.Text;
            double updatePrice       = Convert.ToDouble(productUpdatePrice.Text);
            int    updateQuantity    = Convert.ToInt32(productUpdateQuantity.Text);
            string InsertImage       = "../img/" + Convert.ToString(updateFileUploadImg.FileName);

            //Checks to see if all the inputs are valid
            if (IsValid)
            {
                //Checks to see if file type is an image
                if (updateFileUploadImg.PostedFile.ContentType == "image/jpeg" || updateFileUploadImg.PostedFile.ContentType == "image/png" || updateFileUploadImg.PostedFile.ContentType == "image/jpg")
                {
                    //Make error message invisible if file type is correct
                    updateImageFileError.Visible = false;
                    //Save image to project
                    updateFileUploadImg.SaveAs(Server.MapPath("~/../img/" + updateFileUploadImg.FileName));
                    //Change dummy data in global data to equal to updated data
                    p.Category    = updateCategory;
                    p.Name        = updateName;
                    p.Stock       = updateStock;
                    p.Description = updateDescription;
                    p.Price       = updatePrice;
                    p.Quantity    = updateQuantity;
                    p.Image       = InsertImage;
                    QueryClass.UpdateProduct(p);
                    Response.Redirect("ManageProducts.aspx");
                }
                else
                {
                    //make error message visbile
                    updateImageFileError.Visible = true;
                }
            }
        }
コード例 #28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            mode   = Request.QueryString["mode"];
            order  = Request.QueryString["order"];
            user   = Request.QueryString["user"];
            orders = QueryClass.GetOrders();

            if (mode != null && order != null)
            {
                if (mode.Equals("toggleSent"))
                {
                    if (GlobalData.Orders[Convert.ToInt32(order)].Status.Equals("Processing"))
                    {
                        GlobalData.Orders[Convert.ToInt32(order)].Status = "Sent";
                    }
                    else if (GlobalData.Orders[Convert.ToInt32(order)].Status.Equals("Sent"))
                    {
                        GlobalData.Orders[Convert.ToInt32(order)].Status = "Processing";
                    }
                }
            }
        }
コード例 #29
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //Stops page from repopulating with previous data
     if (!IsPostBack)
     {
         //Request product value from viewProduct page depending on which product is selected
         string product   = Request.QueryString["product"];
         int    productID = 0;
         try
         {
             productID = Convert.ToInt32(product);
         }
         catch { }
         p = QueryClass.GetProduct(productID);
         //Change textbox text to equal product values of item selected
         productUpdateName.Text        = p.Name;
         productUpdateCategory.Text    = p.Category;
         productUpdateStock.Text       = p.Stock.ToString();
         productUpdateDescription.Text = p.Description;
         productUpdatePrice.Text       = p.Price.ToString("F");
         productUpdateQuantity.Text    = p.Quantity.ToString();
     }
 }
コード例 #30
0
 protected void btnConfirm_Click(object sender, System.EventArgs e)
 {
     //Update/Change user information on submit
     if (IsValid)
     {
         User user = (User)Session["user"];
         user.FirstName = ((TextBox)FindControl("firstName")).Text;
         user.LastName  = ((TextBox)FindControl("lastName")).Text;
         user.Street    = ((TextBox)FindControl("streetAddress")).Text;
         user.Suburb    = ((TextBox)FindControl("suburb")).Text;
         user.Postcode  = ((TextBox)FindControl("postCode")).Text;
         user.DOB       = ((TextBox)FindControl("birthDate")).Text;
         user.Phone     = ((TextBox)FindControl("firstName")).Text;
         QueryClass.UpdateUser(user);
         Session["user"] = user;
         Response.Redirect("Main.aspx");
     }
     // Error message displayed if fields are not correctly filled
     else
     {
         ((Label)FindControl("errorMessage")).Visible = true;
     }
 }
コード例 #31
0
ファイル: DnsQuery.cs プロジェクト: withinboredom/callmeback
 public DnsQuery(string domainName, QueryType qType)
 {
     DomainName = domainName;
     QueryType = qType;
     QueryClass = QueryClass.Internet;
 }
コード例 #32
0
ファイル: DnsQuery.cs プロジェクト: withinboredom/callmeback
 public DnsQuery(string domainName, QueryType qtype, QueryClass qclass)
 {
     DomainName = domainName;
     QueryType = qtype;
     QueryClass = qclass;
 }