当前位置: 首页>>代码示例>>C#>>正文


C# Connector.showExclamation方法代码示例

本文整理汇总了C#中Connector.showExclamation方法的典型用法代码示例。如果您正苦于以下问题:C# Connector.showExclamation方法的具体用法?C# Connector.showExclamation怎么用?C# Connector.showExclamation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Connector的用法示例。


在下文中一共展示了Connector.showExclamation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: frmLogin_Load

        private void frmLogin_Load(object sender, EventArgs e)
        {
            js = new Connector(AccessRegistryTool.ReadValue("DBServer"),"Kids_Checkin","kidschurch","[email protected]");

            icon.Icon = new Icon(Application.StartupPath + @"\kids-icon.ico");
            icon.Visible = true;

            txtRoom.Text = this.Tag.ToString();

            lblConnected.Text = "Connected To: " + AccessRegistryTool.ReadValue("DBServer");

            fldRoomID = js.Lookup("fldID", "tblRoom", "fldRoom='" + txtRoom.Text + "'");

            string eID = js.Lookup("fldID", "tblCustomizedEvent", "fldEventCode='" + this.Text + "'");

            lblTotal.Text = js.Lookup("fldMaxCapacity", "tblCustomizedEventRooms", "fldRoomID='" + fldRoomID + "' AND fldCEventID='" + eID + "'");

            txtAge1.Text = js.Lookup("fldAgeFrom", "tblCustomizedEventRooms", "fldRoomID='" + fldRoomID + "' AND fldCEventID='" + eID + "'");
            txtAge2.Text = js.Lookup("fldAgeTo", "tblCustomizedEventRooms", "fldRoomID='" + fldRoomID + "' AND fldCEventID='" + eID + "'");

            fldGroupID = js.Lookup("fldID","tblGroup","fldAgeFrom='" + txtAge1.Text + "' AND fldAgeTo='" + txtAge2.Text + "'");

            if(Convert.ToInt32(txtAge1.Text)< 7)
            {
                btnAddPoints.Enabled = false;
            }

            string timetoday = DateTime.Now.ToString("hh:mm tt");

            string q = "SELECT * FROM tblEvent WHERE fldRegistrationTime <= convert(time,'" + timetoday + "') AND fldEndTime >=convert(time,'" + timetoday + "')";

            js.ExecuteQuery(q);

            js.RiD.Read();

            lblNotification.Text = "";

            if (js.RiD.HasRows)
            {
                fldEventID = "" + js.RiD["fldID"].ToString();

                txtService.Text = js.RiD["fldEventTitle"].ToString();

                LoadAttendance();
                LoadBirthdays();
                LoadNewComer();
                LoadVolunteer();
                dgvAttendance_CellContentClick(null,null);
            }
            else
            {
                js.showExclamation("Cannot open an event yet!, Please try again later");
                frmSystemOptions frm = new frmSystemOptions();
                frm.Show();
                Close();
                return;
            }

            js.CloseConnection();

            StartReader();

            string mode = AccessRegistryTool.ReadValue("RegMode");

            if(mode=="Barcode")
            {
                tmrReader.Enabled = false;
                //rbBarcode_CheckedChanged(null, null);

            }
            else
            {
                tmrReader.Enabled = true;
            }

            //this.BackgroundImage = Image.FromFile(Application.StartupPath + "/Pictures/kids back.jpg");
        }
开发者ID:meanprogrammer,项目名称:KidsCheckinSystem,代码行数:77,代码来源:frmLogin.cs

示例2: pbOverride_Click

        private void pbOverride_Click(object sender, EventArgs e)
        {
            js = new Connector(AccessRegistryTool.ReadValue("DBServer"), "Kids_Checkin", "kidschurch", "[email protected]");
            tmrReader.Enabled = false;
            DataGridViewImageColumn img = new DataGridViewImageColumn();
            int age = 0;
            int group = 0;

            string pathfile = js.GetPath() + "/Kids/" + js.Lookup("fldPicture", "tblKids", "fldID='" + pbOverride.Tag + "'");

            string roomid = js.Lookup("fldID", "tblRoom", "fldRoom='" + txtRoom.Text + "'");

            string firstname = js.Lookup("fldNickName", "tblKids", "fldID='" + pbOverride.Tag + "'");
            string Lastname = js.Lookup("fldLastName", "tblKids", "fldID='" + pbOverride.Tag + "'");
            bool correct = false;
            string room = "";
            string thistext = "";
            string id = js.Lookup("fldID", "tblCustomizedEvent", "fldEventCode='" + this.Text + "'");

            if(lblCount.Text==lblTotal.Text)
            {

                string qry = "SELECT er.fldRoomID,r.fldRoom FROM tblCustomizedEventRooms er " +
                              "  LEFT OUTER JOIN tblRoom r on r.fldID=er.fldRoomID" +
                               " WHERE er.fldMaxCapacity>(SELECT Count(*) FROM tblAttendance WHERE fldRoomID=er.fldRoomID AND fldLoginDateTime BETWEEN '" + DateTime.Now.ToShortDateString() + " 00:00:00' AND '" + DateTime.Now.ToShortDateString() + " 23:59:59' AND fldEventID='" + fldEventID + "')" +
                               " AND fldCEventID='" + id + "'";
                js.ExecuteQuery(qry);

                js.RiD.Read();

                if (js.RiD.HasRows)
                {
                    room = "" + js.RiD["fldRoom"].ToString();
                    roomid = js.RiD["fldRoomID"].ToString();
                }

                if(room!="")
                {
                    js.showExclamation("Room: " + txtRoom.Text + " is already maxed out the kid will be transferred to Room: " + room);
                }
                else
                {
                    room = txtRoom.Text;
                    roomid =  js.Lookup("fldID", "tblRoom", "fldRoom='" + txtRoom.Text + "'");
                    js.showExclamation("Room: " + txtRoom.Text + " is already maxed out, the kid will be added to Room: " + room);
                }

            }
               id = js.Lookup("fldID", "tblCustomizedEvent", "fldEventCode='" + this.Text + "'");

            string qq = "SELECT er.fldRoomID,r.fldRoom,er.fldAgeFrom,er.fldAgeTo FROM tblCustomizedEventRooms er " +
                              "  LEFT OUTER JOIN tblRoom r on r.fldID=er.fldRoomID" +
                               " WHERE er.fldMaxCapacity>(SELECT Count(*) FROM tblAttendance WHERE fldRoomID=er.fldRoomID AND fldLoginDateTime BETWEEN '" + DateTime.Now.ToShortDateString() + " 00:00:00' AND '" + DateTime.Now.ToShortDateString() + " 23:59:59' AND fldEventID='" + fldEventID + "')" +
                               " AND fldCEventID='" + id + "'";

            while (correct == false)
            {
                //string value = "";
                frmOverride frm = new frmOverride();
                if (frm.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)
                {

                }
                else
                {

                    checkin.frmOverFlowRoom form = new checkin.frmOverFlowRoom();
                    form.Tag = qq;
                    if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        string[] tag = form.Tag.ToString().Split(char.Parse("|"));

                        room = tag[1];
                        roomid = tag[0];
                    }
                    correct = true;
                    //return;
                }

            }

            if (System.IO.File.Exists(pathfile))
            {
                img.Image = Image.FromFile(pathfile);

                img.Image = (Image)(new Bitmap(img.Image, new Size(150, 150)));
            }
            else
            {
                img.Image = Image.FromFile(Application.StartupPath + "/Pictures/download.jpg");
                img.Image = (Image)(new Bitmap(img.Image, new Size(150, 150)));
            }

            pbImageKid.Image = img.Image;

            txtName.Text = firstname + " " + Lastname;

            txtBirthday.Text = Convert.ToDateTime(js.Lookup("fldBirthday", "tblKids", "fldID='" + pbOverride.Tag + "'")).ToShortDateString();

            DateTime sdate = Convert.ToDateTime(DateTime.Now.ToString("MM/dd"));
//.........这里部分代码省略.........
开发者ID:meanprogrammer,项目名称:KidsCheckinSystem,代码行数:101,代码来源:frmLogin.cs


注:本文中的Connector.showExclamation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。