Beispiel #1
0
    public List<Patient_Contact> GetDashBoardContacts(long PatientID)
    {
        dl = new DataLayer();
        SqlCommand cmd = new SqlCommand();
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "Portal_GetDashBoardContacts";
        cmd.Parameters.AddWithValue("PatientID", PatientID);

        List<Patient_Contact> contacts = new List<Patient_Contact>();
        DataTable dt = dl.Execute(cmd);

        foreach (DataRow dr in dt.Rows)
        {
            Patient_Contact contact = new Patient_Contact
            {
                ID = Int64.Parse(dr["ID"].ToString()),
                ContactName = dr["ContactName"].ToString(),
                ContactType = dr["ContactType"].ToString(),
                ContactPhoneNumber = dr["PhoneNumber"].ToString(),
                Emergency = bool.Parse(dr["Emergency"].ToString())

            };

            contacts.Add(contact);

        }

        return contacts;
    }
Beispiel #2
0
        public List<MediaGroup> GetMediaGroups()
        {
            DataLayer dal = new DataLayer();
            dal.ConnectionString = ConectionString;
            dal.Connect();

            SqlCommand cmd = new SqlCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "GetMediaGroups";

            DataTable dt = dal.Execute(cmd);
            List<MediaGroup> MediaGroups = new List<MediaGroup>();

            foreach (DataRow dr in dt.Rows)
            {
                MediaGroup mediagroup = new MediaGroup
                {
                    MediaID = Int32.Parse(dr["MediaID"].ToString()),
                    MediaTitle = dr["MediaTitle"].ToString(),
                    MediaType = dr["MediaType"].ToString(),
                    DateCreated = DateTime.Parse(dr["DateCreated"].ToString())
                };

                MediaGroups.Add(mediagroup);

            }
            return MediaGroups;
        }
Beispiel #3
0
    public HopeEvent GetEvent(Int64 EventID )
    {
        dl = new DataLayer(pConnectionString);
        SqlCommand cmd = new SqlCommand();
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "GetEvent";
        cmd.Parameters.AddWithValue("@EventID", EventID);

         DataTable dt = dl.Execute(cmd);

        foreach (DataRow dr in dt.Rows)
        {
            HopeEvent the_event = new HopeEvent
            {
                ID = Int64.Parse(dr["ID"].ToString()),

                EventName = dr["EventName"].ToString(),
                ShortDescription = dr["ShortDescription"].ToString(),
                LongDescription = dr["LongDescription"].ToString(),
                AdditionalInformation = dr["AdditionalInformation"].ToString(),
                RegistrationInformation = dr["RegistrationInformation"].ToString(),
                Sort = Int32.Parse(dr["Sort"].ToString()),
                DateCreated = Convert.ToDateTime(dr["DateCreated"].ToString())

            };

            return the_event;

        }

        return null;
    }
Beispiel #4
0
    public List<EventPicture> GetEventPictures(Int64 EventID)
    {
        DataLayer dl = new DataLayer();

        SqlCommand cmd = new SqlCommand();
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "[GetEventsPictures]";
        cmd.Parameters.AddWithValue("@EventID", EventID);

        List<EventPicture> Pictures = new List<EventPicture>();
        DataTable dt = dl.Execute(cmd);

        foreach (DataRow dr in dt.Rows)
        {
            EventPicture picture = new EventPicture
            {
                PictureID = Int64.Parse(dr["PictureID"].ToString()),

                PictureURL = dr["PictureURL"].ToString(),

            };

            Pictures.Add(picture);

        }

        return Pictures;
    }
Beispiel #5
0
        public frmDepartment(ref DataLayer objDL)
        {
            InitializeComponent();
            m_DL = objDL;

            InitializeUI();
        }
    protected void btnSumbit_Click(object sender, EventArgs e)
    {
        DataLayer dl = new DataLayer();
        string sMemberName = "<i>Anonymous</i>";
        if (User.Identity.IsAuthenticated)
        {
            if (!cbxAnonymous.Checked)
            {
                sMemberName = dl.GetFullMemberNameBy_Email(User.Identity.Name);
            }
        }

        SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
        MailMessage mm;

        mm = new MailMessage();
        mm.BodyFormat = MailFormat.Html;
        mm.To = "[email protected];[email protected]";
        mm.From = "*****@*****.**";
        mm.Subject = "New \"Ask The Success Coach\" question!";
        mm.Body = sMemberName + " submitted a question to the Success Coach.<br /><br />";
        mm.Body += tbxQuestion.Text.Replace("\n", "<br />").Replace("\r", "");

        SmtpMail.Send(mm);

        Session["resultColor"] = "#007700";
        Session["resultTitle"] = "Question Sent";
        Session["resultMessage"] = "The Success Coach will answer your question in his next blog update.";
        Session["resultReturnURL"] = "Blogs.aspx";
        Response.Redirect("Result.aspx", true);
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (tbxCode.Text == Session["CaptchaImageText"].ToString())
        {
            if (this.IsValid)
            {
                DataLayer dl = new DataLayer();
                dl.AddNonMember(tbxNonMemberEmail.Text, tbxNonMemberName.Text, true, true);

                SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
                MailMessage mm;
                mm = new MailMessage();
                mm.BodyFormat = MailFormat.Html;
                mm.To = "[email protected];[email protected]";
                mm.From = "*****@*****.**";
                mm.Subject = "Someone signed up for the RNX free content.";
                mm.Body = tbxNonMemberName.Text + " subscribed to the RNX free content using this email: " + tbxNonMemberEmail.Text;
                SmtpMail.Send(mm);

                Session["resultColor"] = "#007700";
                Session["resultTitle"] = "Success!";
                Session["resultMessage"] = "You have successfully subscribed to the RNX free content!";
                Session["resultReturnURL"] = "Default.aspx";
                Response.Redirect("Result.aspx", true);
            }

        }
        else
        {
            cvInvalidCode.IsValid = false;
        }
    }
 protected void lbtnQuotePost_Click(object sender, EventArgs e)
 {
     if (Request.QueryString["rt"] != null)
     {
         int iRTPostID = Convert.ToInt32(Request.QueryString["rt"]);
         DataLayer dl = new DataLayer();
         DataTable dtRTPost = dl.GetForumPostBy_PostID(iRTPostID);
         rteBody.Value += "<div style=\"background-color:#ddddee; border: solid 2px #000077;padding:10px;\">";
         rteBody.Value += dtRTPost.Rows[0].ItemArray[4].ToString();
         rteBody.Value += "<br /><br /><div style=\"font-size: 12px;font-weight:bold;\">Posted by <a href=\"Profile.aspx?member=" + dtRTPost.Rows[0].ItemArray[2].ToString() + "\">";
         rteBody.Value += dl.GetFullMemberNameBy_Email(dtRTPost.Rows[0].ItemArray[2].ToString());
         rteBody.Value += "</a> on " + dtRTPost.Rows[0].ItemArray[3].ToString() + "</div></div><br />";
     }
     else
     {
         int iRTTopicID = Convert.ToInt32(Request.QueryString["topic"]);
         DataLayer dl = new DataLayer();
         DataTable dtRTTopic = dl.GetForumTopicBy_TopicID(iRTTopicID);
         rteBody.Value += "<div style=\"background-color:#ddddee; border: solid 2px #000077;padding:10px;\">";
         rteBody.Value += dtRTTopic.Rows[0].ItemArray[5].ToString();
         rteBody.Value += "<br /><br /><div style=\"font-size: 12px;font-weight:bold;\">Posted by <a href=\"Profile.aspx?member=" + dtRTTopic.Rows[0].ItemArray[2].ToString() + "\">";
         rteBody.Value += dl.GetFullMemberNameBy_Email(dtRTTopic.Rows[0].ItemArray[2].ToString());
         rteBody.Value += "</a> on " + dtRTTopic.Rows[0].ItemArray[3].ToString() + "</div></div><br />";
     }
 }
Beispiel #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            OrgID = System.Convert.ToInt32(Session["TenantID"]);
        }
        catch (Exception ex)
        {
            try
            {
                OrgID = System.Convert.ToInt32(Request.QueryString["OrgID"]);
            }
            catch (Exception ex2)
            {
            }
        }
        DataLayer dl = new DataLayer();
        string loginurl = dl.getNextService(OrgID,0,"User Login");
        string registerurl = dl.getNextService(OrgID, 0, "User Registration");
        login.HRef = loginurl;
        register.HRef = registerurl;

        if (Session["user"] != null)
            Response.Redirect("members.aspx");
        if (Session["user1"] != null)
            Response.Redirect("CustomerPage.aspx");
    }
Beispiel #10
0
 public DataTable GetMyChildrens()
 {
     DataLayer dl=new DataLayer();
     Person myPersion=new Person();
     DataTable dt = dl.GetStudentList(base.SchoolID, "-1", "", "", "-1", "-1", _pepoleID, "", "order by StudentNumber asc", 70, 1);
     return dt;
 }
Beispiel #11
0
        public string ProcessInvoice(DataLayer.Entities.Invoice invoice)
        {
            invoice.InvoiceDate = DateTime.Today.Date.ToShortDateString();
            invoice.InvoiceNum = InvoiceNumberGenerator.GenerateInvoiceNumber();

            return _repo.POSProcessInvoices(invoice);
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            UITextFieldCondition firstCondition = new UITextFieldCondition (delegate {
                txtFirstName.ResignFirstResponder();
                return false;
            });
            txtFirstName.ShouldReturn = firstCondition;

            UITextFieldCondition secondCondition = new UITextFieldCondition (delegate {
                txtSurname.ResignFirstResponder();
                return false;
            });
            txtSurname.ShouldReturn = secondCondition;

            UITextFieldCondition emailCondition = new UITextFieldCondition (delegate {
                txtEMail.ResignFirstResponder();
                return false;
            });
            txtEMail.ShouldReturn = emailCondition;

            UITextFieldCondition mobileCondition = new UITextFieldCondition (delegate {
                txtMobile.ResignFirstResponder();
                return false;
            });
            txtMobile.ShouldReturn = mobileCondition;

            btnUpdate.TouchUpInside += (object sender, EventArgs e) => {
                DataLayer dl = new DataLayer();
                string gender = "Female";
                if (segGender.SelectedSegment == 1)
                    gender = "Male";
                if (PersonID == 0)
                {
                    List<Person> duplicates = dl.getPersonByName(txtFirstName.Text, txtSurname.Text);
                    if (duplicates.Count > 0)
                        PersonID = duplicates[0].ID;
                }
                PersonID = dl.updatePerson(PersonID, dl.GetCampusID(), txtFirstName.Text, txtSurname.Text, gender, dpDoB.Date,txtMobile.Text, txtEMail.Text, 0);
                if (Relationship != 0)
                {
                    switch (Relationship)
                    {
                    case 1:
                        dl.updateSpouse1(MarriedRelionshipID, PersonID);
                        break;
                    case 2:
                        dl.updateSpouse2(MarriedRelionshipID, PersonID);
                        break;
                    default:
                        dl.createParentRelationship(MarriedRelionshipID, PersonID, false);
                        break;
                    }
                }

                UINavigationController parent = this.NavigationController;
                parent.PopViewControllerAnimated(true);
            };
        }
Beispiel #13
0
 public ExpenditureDetails()
 {
     InitializeComponent();
     _expenditures = new List<EXPENDITUREDETAIL>();
     data = DataLayer.Instance;
     dateOfExpenditure.SelectedDate = DateTime.Today;
 }
Beispiel #14
0
    public List<Insurance_DashBoard> GetDashBoardInsurance(long PatientID)
    {
        dl = new DataLayer();
        SqlCommand cmd = new SqlCommand();
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "Portal_GetDashBoardInsuranceProviders";

        cmd.Parameters.AddWithValue("PatientID", PatientID);

        List<Insurance_DashBoard> Insurances = new List<Insurance_DashBoard>();
        DataTable dt = dl.Execute(cmd);

        foreach (DataRow dr in dt.Rows)
        {
            Insurance_DashBoard Insurance = new Insurance_DashBoard
            {
                ID = Int64.Parse(dr["ID"].ToString()),
                ProviderName = dr["ProviderName"].ToString(),
                InsuranceType = dr["InsuranceType"].ToString(),
                CreatedBy = dr["CreatedBy"].ToString(),
                GroupNumber = dr["GroupNumber"].ToString(),
                PolicyNumber = dr["PolicyNumber"].ToString(),
                DateCreated = Convert.ToDateTime(dr["DateCreated"].ToString()),

            };

            Insurances.Add(Insurance);

        }

        return Insurances;
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        DataLayer dl = new DataLayer();
        if (dl.EmailExists(tbxEmail.Text))
        {
            string sPassword = dl.GetMemberBy_Email(tbxEmail.Text).Rows[0].ItemArray[1].ToString();

            SmtpMail.SmtpServer = "relay-hosting.secureserver.net";
            MailMessage mm;

            mm = new MailMessage();
            mm.BodyFormat = MailFormat.Html;
            mm.To = tbxEmail.Text;
            mm.From = "*****@*****.**";
            mm.Subject = "Your password for ReferralNetworX.com";
            mm.Body = "You requested to have your password sent to you. It is listed below.<br /><br />Username: "******"<br />Password: "******"resultColor"] = "#007700";
            Session["resultTitle"] = "Password Sent";
            Session["resultMessage"] = "Your password has been sent to your email.";
            Session["resultReturnURL"] = "Default.aspx";
            Response.Redirect("Result.aspx", true);
        }
        else
        {
            Session["resultColor"] = "#ff0000";
            Session["resultTitle"] = "Email Not Found";
            Session["resultMessage"] = "The email you provided was not found.";
            Session["resultReturnURL"] = "Default.aspx";
            Response.Redirect("Result.aspx", true);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (!User.Identity.IsAuthenticated)
        //{
        //    Session["resultColor"] = "#ff0000";
        //    Session["resultTitle"] = "Members Only";
        //    Session["resultMessage"] = "This is a members only area.<br />You must log in first.";
        //    Session["resultReturnURL"] = "Directory.aspx";
        //    Response.Redirect("Result.aspx", true);
        //}

        DataLayer dl = new DataLayer();
        loggedinpanels.Controls.Add(new LiteralControl("<div style=\"width:250px;\" class=\"contenttitle\">Featured Member</div><div class=\"contentpanel\">"));
        DataTable dtRandomMember = dl.GetRandomMember();
        loggedinpanels.Controls.Add(new LiteralControl("<table style=\"width:100%;\"><tr><td style=\"font-size:13px;text-align:center;\"><a href=\"Profile.aspx?member=" + dtRandomMember.Rows[0].ItemArray[0].ToString() + "\"><img style=\"border-width:0px;\" src=\"MakeThumbnail.aspx?size=100&image=images/MemberAvatars/" + dtRandomMember.Rows[0].ItemArray[3].ToString() + "\" /></a><br /><a href=\"Profile.aspx?member=" + dtRandomMember.Rows[0].ItemArray[0].ToString() + "\">View Profile</a></td><td style=\"padding-left:5px;font-size:13px;width:100%;\"><b>Name:</b> " + dtRandomMember.Rows[0].ItemArray[2].ToString() + "<br /><br /><b>Location:</b> " + dtRandomMember.Rows[0].ItemArray[17].ToString() + "<br /><br /><b>Business:</b> " + dtRandomMember.Rows[0].ItemArray[8].ToString() + "<br /><br />"));
        if (dtRandomMember.Rows[0].ItemArray[6].ToString() != "")
        {
            loggedinpanels.Controls.Add(new LiteralControl("<center><a href=\"" + dtRandomMember.Rows[0].ItemArray[6].ToString() + "\">Visit Website</a></center>"));
        }
        loggedinpanels.Controls.Add(new LiteralControl("</td></tr></table></div>"));

        DataTable dtMemberAd = dl.GetRandomAd();
        loggedinpanels.Controls.Add(new LiteralControl("<div class=\"contenttitle\">Member Ad</div><div style=\"text-align:center;\" class=\"contentpanel\"><a href=\"" + dtMemberAd.Rows[0].ItemArray[2].ToString() + "\"><img style=\"width:230px; border-width:0px;\" src=\"" + dtMemberAd.Rows[0].ItemArray[1].ToString() + "\" /></a></div>"));

        if (User.Identity.IsAuthenticated)
        {
            loggedinpanels.Controls.Add(new LiteralControl("<div style=\"width:250px;\" class=\"contenttitle\">Popular Topics</div><div style=\"font-size:15px;\" class=\"contentpanel\"><ul>"));
            DataTable dtTopics = dl.GetFiveTopics();
            foreach (DataRow dr in dtTopics.Rows)
            {
                loggedinpanels.Controls.Add(new LiteralControl("<li><a href=\"Topic.aspx?topic=" + dr.ItemArray[0].ToString() + "\">" + dr.ItemArray[4].ToString() + "</a></li>"));
            }
            loggedinpanels.Controls.Add(new LiteralControl("</ul></div>"));
        }
    }
Beispiel #17
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        DataLayer dataLayer = new DataLayer();
        DataRow row = dataLayer.Login(Username.Text, Password.Text);
        if (row != null)
        {
            //TODO:定義UserData,可以存放使用者資訊到Cookie,記住!!UserData因為是放在Cookie,所以IE和Netscape所支援的最大容量為4096bytes
            //    //UserData為一個字串用";"分開每個功能作用
            //    //目前的定義:所屬角色ID
            SPerson person = new SPerson();
            person.account = Username.Text;
            person.name = row["name"].ToString();
            //person.Permission = dataLayer.GetPermissionStringByID(row["id"].ToString());

            person.email = row["emailAddress"].ToString();
            person.Role = row["role"].ToString();
            person.School_id = row["school_id"].ToString();
            person.people_id = row["people_id"].ToString();

            string userData = JsonConvert.SerializeObject(person);
            SetAuthenTicket(userData, Username.Text);
            //System.IO.File.AppendAllText(Server.MapPath("Login.log"), DateTime.Now.ToString() + "====>" + Username.Text + "," + row["name"] + "," + row["Organization"] + "\r\n");
            Response.Redirect("SchoolZone.aspx");

        }else
        {
            lblErrer.Text = "您輸入的帳號或密碼有誤,請再輸入一次!";
        }
    }
Beispiel #18
0
        public MediaGroup GetMediaGroup(int MediaID)
        {
            DataLayer dal = new DataLayer();
            dal.ConnectionString = ConnectionString;
            dal.Connect();

            SqlCommand cmd = new SqlCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "GetMediaGroup";

            cmd.Parameters.AddWithValue("@MediaID", MediaID);

            DataTable dt = dal.Execute(cmd);

            DataRow dr = dt.Rows[0];
            return new MediaGroup
            {
                MediaID = Int32.Parse(dr["MediaID"].ToString()),
                MediaTitle = dr["MediaTitle"].ToString(),
                MediaType = dr["MediaType"].ToString(),
                ProductID = Int32.Parse(dr["ProductID"].ToString()),
                Active = bool.Parse(dr["Active"].ToString()),
                DateCreated = DateTime.Parse(dr["DateCreated"].ToString())
            };
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (User.Identity.IsAuthenticated)
        {
            cbxAnonymous.Visible = true;
        }
        else
        {
            cbxAnonymous.Visible = false;
        }

        DataLayer dl = new DataLayer();
        if (User.Identity.IsAuthenticated)
        {
            loggedinpanels.Controls.Add(new LiteralControl("<div style=\"width:250px;\" class=\"contenttitle\">Featured Member</div><div class=\"contentpanel\">"));
            DataTable dtRandomMember = dl.GetRandomMember();
            loggedinpanels.Controls.Add(new LiteralControl("<table style=\"width:100%;\"><tr><td style=\"font-size:13px;text-align:center;\"><a href=\"Profile.aspx?member=" + dtRandomMember.Rows[0].ItemArray[0].ToString() + "\"><img style=\"border-width:0px;\" src=\"MakeThumbnail.aspx?size=100&image=images/MemberAvatars/" + dtRandomMember.Rows[0].ItemArray[3].ToString() + "\" /></a><br /><a href=\"Profile.aspx?member=" + dtRandomMember.Rows[0].ItemArray[0].ToString() + "\">View Profile</a></td><td style=\"padding-left:5px;font-size:13px;width:100%;\"><b>Name:</b> " + dtRandomMember.Rows[0].ItemArray[2].ToString() + "<br /><br /><b>Location:</b> " + dtRandomMember.Rows[0].ItemArray[17].ToString() + "<br /><br /><b>Business:</b> " + dtRandomMember.Rows[0].ItemArray[8].ToString() + "<br /><br />"));
            if (dtRandomMember.Rows[0].ItemArray[6].ToString() != "")
            {
                loggedinpanels.Controls.Add(new LiteralControl("<center><a href=\"" + dtRandomMember.Rows[0].ItemArray[6].ToString() + "\">Visit Website</a></center>"));
            }
            loggedinpanels.Controls.Add(new LiteralControl("</td></tr></table></div>"));
        }

        DataTable dtMemberAd = dl.GetRandomAd();
        loggedinpanels.Controls.Add(new LiteralControl("<div class=\"contenttitle\">Member Ad</div><div style=\"text-align:center;\" class=\"contentpanel\"><a href=\"" + dtMemberAd.Rows[0].ItemArray[2].ToString() + "\"><img style=\"width:230px; border-width:0px;\" src=\"" + dtMemberAd.Rows[0].ItemArray[1].ToString() + "\" /></a></div>"));
    }
Beispiel #20
0
        public MediaGroupItem GetMediaGroupItem(string AssetID)
        {
            DataLayer dal = new DataLayer();
            dal.ConnectionString = ConnectionString;
            dal.Connect();

            SqlCommand cmd = new SqlCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "GetMediaGroupItem";
            cmd.Parameters.AddWithValue("@AssetID", AssetID);

            DataTable dt = dal.Execute(cmd);

            foreach (DataRow dr in dt.Rows)
            {
                MediaGroupItem mediagroupitem = new MediaGroupItem
                {
                    MediaID = Int32.Parse(dr["MediaID"].ToString()),
                    AssetID = dr["AssetID"].ToString(),
                    FileName = dr["FileName"].ToString(),
                    PreviewImageURL = dr["PreviewImage"].ToString(),
                    FilePath = dr["FilePath"].ToString(),
                    PermanentLinkURL = dr["PermanentLink"].ToString(),
                    Sort = Int32.Parse(dr["Sort"].ToString())
                };

                return mediagroupitem;
            }

            return null;
        }
 private void Show()
 {
     DataLayer dl = new DataLayer();
     DataTable dt = dl.GetTimeTableDatabyGradeId(Request["grade_id"]);
     DataList1.DataSource = dt;
     DataList1.DataBind();
 }
 protected void ApplyButton_Click(object sender, EventArgs e)
 {
     Coupons coupon = new Coupons();
     DataLayer dLayer = new DataLayer();
     int OrgID;
     int serviceOrder;
     int shopperID;
     string url;
     string workflow = Session["workflow"].ToString();
     try
     {
         OrgID = System.Convert.ToInt32(Session["OrgID"]);
     }
     catch (Exception ex)
     {
         OrgID = 0;
     }
     try
     {
         shopperID = System.Convert.ToInt32(Session["shopperID"]);
     }
     catch (Exception ex)
     {
         shopperID = 0;
     }
     try
     {
         serviceOrder = System.Convert.ToInt32(Session["serviceOrder"]);
     }
     catch (Exception ex)
     {
         serviceOrder = 0;
     }
     double total = 0; //TODO: change to get from order
     try
     {
         total = System.Convert.ToDouble(Session["total"]);
         int couponID = System.Convert.ToInt32(txtCID.Text);
         TempLabel.Text = System.Convert.ToString(coupon.ValidateCoupon(couponID, OrgID, total));
     }
     catch (FormatException ex)
     {
         TempLabel.Text = "Can not convert string";
     }
     catch (OverflowException ex)
     {
         TempLabel.Text = "Number too large";
     }
     catch (Exception ex)
     {
     }
     serviceOrder = serviceOrder + 1;
     Session["serviceOrder"] = serviceOrder;
     url = dLayer.getNextService(OrgID, serviceOrder, workflow);
     if (url == "")
     {
         url = "ApplyCoupon.aspx";
     }
     Response.Redirect(url);
 }
Beispiel #23
0
        public frmDeveloper()
        {
            InitializeComponent();
            m_DL = new DataLayer();

            InitializeUI();
        }
 protected void btnAddToCart_Click(object sender, EventArgs e)
 {
     DataLayer dl = new DataLayer();
     string items = "";
     for (int x = 0; x < chkBox.Length; x++)
     {
         try
         {
             if (chkBox[x].Checked)
             {
                 if (items == "")
                 {
                     items = cell[x + 1, 1].Text;
                 }
                 else
                 {
                     items = items + "," + cell[x + 1, 1].Text;
                 }
             }
         }
         catch
         {
         }
     }
     Session["Items"] = items;
     Session["ObjID"] = 3;
     Session["orgID"] = 1001;
     Response.Redirect(dl.getNextService(1001, 0, "Add to cart"));
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (!User.Identity.IsAuthenticated)
        //{
        //    Session["resultColor"] = "#ff0000";
        //    Session["resultTitle"] = "Members Only";
        //    Session["resultMessage"] = "This is a members only area.<br />You must log in first.";
        //    Session["resultReturnURL"] = "NewsletterArchive.aspx";
        //    Response.Redirect("Result.aspx", true);
        //}

        int iNID = 0;
        if (Request.QueryString["nid"] == null)
        {
            Session["resultColor"] = "#ff0000";
            Session["resultTitle"] = "No Newsletter";
            Session["resultMessage"] = "No Newsletter Specified";
            Session["resultReturnURL"] = "NewsletterArchive.aspx";
            Response.Redirect("Result.aspx", true);
        }
        else
        {
            iNID = Convert.ToInt32(Request.QueryString["nid"]);
        }

        DataLayer dl = new DataLayer();
        DataTable dtNewsletter = dl.GetNewsletterBy_NewsletterID(iNID);
        this.Title = dtNewsletter.Rows[0].ItemArray[2].ToString();
        divNewsletterTitle.InnerText = dtNewsletter.Rows[0].ItemArray[2].ToString();
        divNewsletterContent.InnerHtml = dtNewsletter.Rows[0].ItemArray[3].ToString();
    }
    protected void PopulateListings(string sCategory)
    {
        businesslistingstitle.InnerText = sCategory;
        int iPageNumber = 0;
        if (Request.QueryString["p"] != null)
            iPageNumber = Convert.ToInt32(Request.QueryString["p"]);
        DataLayer dl = new DataLayer();
        DataTable dtBusinesses = dl.GetFifteenBusinessesBy_BusinessCategory(sCategory, iPageNumber);
        int iMaxPages = Convert.ToInt32(Math.Ceiling(Convert.ToDecimal(dl.GetBusinessCountBy_Category(sCategory)) / 15m));

        pageNav1.NumPages = iMaxPages;
        pageNav2.NumPages = iMaxPages;

        foreach (DataRow dr in dtBusinesses.Rows)
        {
            //divBusinessListings.InnerHtml += "<a href=\"Profile.aspx?member=" + dr.ItemArray[0].ToString() + "\">" + dr.ItemArray[1].ToString() + " (" + dr.ItemArray[3].ToString() + ")</a><br />";

            divBusinessListings.Controls.Add(new LiteralControl("<div style=\"background-color:#CCDDCC;border:solid 1px #333333;padding:5px;margin-bottom:10px;\"><table style=\"width:100%;\"><tr><td rowspan=\"2\" style=\"vertical-align:top;text-align:center;font-size:17px;font-weight:bold;padding-right:10px;border-right:solid 1px #333333;width:150px;\"><a style=\"text-decoration:none;\" href=\"Profile.aspx?member=" + dr.ItemArray[0].ToString() + "\"><img style=\"border-width:0px;\" src=\"MakeThumbnail.aspx?size=150&image=images/BusinessLogos/" + dr.ItemArray[2].ToString() + "\" /></a><br /><br /><a href=\"Profile.aspx?member=" + dr.ItemArray[0].ToString() + "\">" + dr.ItemArray[1].ToString() + "</a></td><td style=\"text-align:left;vertical-align:top;padding-left:10px;\">"));
            divBusinessListings.Controls.Add(new LiteralControl("<b>Location:</b> " + dr.ItemArray[4].ToString() + "<br /><br />"));
            divBusinessListings.Controls.Add(new LiteralControl("<b>Member:</b> " + dr.ItemArray[3].ToString() + "<br /><br />"));
            if (dr.ItemArray[5].ToString().Length > 0)
            {
                divBusinessListings.Controls.Add(new LiteralControl("<b>Website:</b> <a href=\"" + dr.ItemArray[5].ToString() + "\">" + dr.ItemArray[5].ToString() + "</a><br /><br />"));
            }
            divBusinessListings.Controls.Add(new LiteralControl("</td></tr></table></div>"));
        }
    }
 protected void btnPlaceOrder_Click(object sender, EventArgs e)
 {
     PlaceOrderService wsPlaceOrder = new PlaceOrderService();
     DataLayer dLayer = new DataLayer();
     int OrgID;
     int serviceOrder;
     int shopperID;
     int cartID;
     string url;
     string workflow;
     try
     {
         workflow = Session["workflow"].ToString();
     }
     catch(Exception ex)
     {
         workflow = "";
     }
     try
     {
         OrgID = System.Convert.ToInt32(Session["OrgID"]);
     }
     catch (Exception ex)
     {
         OrgID = 0;
     }
     try
     {
         shopperID = System.Convert.ToInt32(Session["shopperID"]);
     }
     catch (Exception ex)
     {
         shopperID = 0;
     }
     try
     {
         serviceOrder = System.Convert.ToInt32(Session["serviceOrder"]);
     }
     catch (Exception ex)
     {
         serviceOrder = 0;
     }
     try
     {
         cartID = System.Convert.ToInt32(Session["cartID"]);
     }
     catch (Exception ex)
     {
         cartID = 0;
     }
     Session["orderID"] = wsPlaceOrder.PlaceOrder(OrgID, shopperID, cartID);
     serviceOrder = serviceOrder + 1;
     Session["serviceOrder"] = serviceOrder;
     url = dLayer.getNextService(OrgID, serviceOrder, workflow);
     if (url == "")
     {
         url = "PlaceOrder.aspx";
     }
     Response.Redirect(url);
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         OrgID = System.Convert.ToInt32(Session["TenantID"]);
     }
     catch (Exception ex)
     {
         try
         {
             OrgID = System.Convert.ToInt32(Request.QueryString["OrgID"]);
         }
         catch (Exception ex2)
         {
         }
     }
     DataLayer dl = new DataLayer();
     string url = "";
     string name = "";
     int next = 0;
     url = dl.getNextService(OrgID, next, "Display Items");
     while (url.CompareTo("") != 0 && url.CompareTo("home.aspx") != 0)
     {
         name = DataLayer.getServiceName(url);
         itemsToDisplay.Controls.Add(new LiteralControl("<a href=" + url + ">" + name + "</a> | "));
         next = next + 1;
         url = dl.getNextService(OrgID, next, "Display Items");
     }
 }
Beispiel #29
0
    public List<EventLink> GetEventLinks(Int64 EventID)
    {
        dl = new DataLayer(pConnectionString);
        SqlCommand cmd = new SqlCommand();
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "[GetEventsLinks]";
        cmd.Parameters.AddWithValue("@EventID", EventID);

        List<EventLink> Links = new List<EventLink>();
        DataTable dt = dl.Execute(cmd);

        foreach (DataRow dr in dt.Rows)
        {
            EventLink link = new EventLink
            {
                LinkID = Int64.Parse(dr["LinkID"].ToString()),

                LinkURL = dr["LinkURL"].ToString(),

                LinkDescription = dr["LinkDescription"].ToString(),

            };

            Links.Add(link);

        }

        return Links;
    }
Beispiel #30
0
    public List<Patient_ContactPhone> GetDashBoardContactPhones(long PatientID)
    {
        dl = new DataLayer();
        SqlCommand cmd = new SqlCommand();
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "Portal_GetDashBoardPatientContactNumbers";
        cmd.Parameters.AddWithValue("PatientID", PatientID);

        List<Patient_ContactPhone> contacts = new List<Patient_ContactPhone>();
        DataTable dt = dl.Execute(cmd);

        foreach (DataRow dr in dt.Rows)
        {
            Patient_ContactPhone phone = new Patient_ContactPhone
            {
                PhoneNumber = dr["PhoneNumber"].ToString(),
                PhoneType = dr["PhoneType"].ToString(),
                DateCreated = DateTime.Parse(dr["DateCreated"].ToString()),

            };

            contacts.Add(phone);

        }

        return contacts;
    }