Beispiel #1
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                tbl_QueryProp objtbl_QueryProp = new tbl_QueryProp();
                if (MessageCode > 0)
                {
                    objtbl_QueryProp.MessageCode = MessageCode;
                }
                else
                {
                    objtbl_QueryProp.MessageCode = 0;
                }

                tbl_QueryBAL objtbl_QueryBAL = new tbl_QueryBAL();
                objtbl_QueryProp.Address   = txtAddress.Text;
                objtbl_QueryProp.ContactNo = txtContactNo.Text;
                //objtbl_QueryProp.Date = dtpDate.Value;
                objtbl_QueryProp.Email         = txtEmail.Text;
                objtbl_QueryProp.SenderMessage = txtMessage.Text;
                objtbl_QueryProp.SenderName    = txtName.Text;
                objtbl_QueryProp.Subject       = txtSubject.Text;
                objtbl_QueryProp.Surname       = "";
                objtbl_QueryProp.Status        = false;
                objtbl_QueryProp.Date          = DateTime.Today;
                objtbl_QueryBAL.InsertUpdate_Data(objtbl_QueryProp);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        public DataSet FillData(string strSearch)
        {
            DataSet dsData = new DataSet();

            try
            {
                int           PageCount        = 0;
                tbl_QueryProp objtbl_QueryProp = new tbl_QueryProp();

                objtbl_QueryProp.PageNo      = Convert.ToInt32(txtCurPage.Text);
                objtbl_QueryProp.RecordCount = Convert.ToInt32(20);

                tbl_QueryBAL Objtbl_QueryBAL = new tbl_QueryBAL();
                dsData = Objtbl_QueryBAL.Select_Data(objtbl_QueryProp, ref PageCount);
                lblTotalPageCount.Text = Convert.ToString(PageCount);



                FillGrid(dsData);
                return(dsData);
            }
            catch (Exception ex)
            {
                MessageBox.Show(Convert.ToString(ex.Message));
                this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmMemberMaster.FillData() " + ex.ToString());
            }
            return(dsData);
        }
Beispiel #3
0
        private void UnreadMessage()
        {
            tbl_QueryProp objtbl_QueryProp = new tbl_QueryProp();

            tbl_QueryBAL objtbl_QueryBAL = new tbl_QueryBAL();
            DataSet      dsData          = objtbl_QueryBAL.CountUnreadMessage(objtbl_QueryProp);

            lnkQueryMessage.Text = "Unread Message ( " + Convert.ToString(dsData.Tables[0].Rows[0]["messCode"]) + " )";
        }
Beispiel #4
0
        private void FillData(int MessCode)
        {
            try
            {
                int           PageCount        = 0;
                tbl_QueryProp objtbl_QueryProp = new tbl_QueryProp();
                objtbl_QueryProp.MessageCode = MessCode;

                tbl_QueryBAL objtbl_QueryBAL = new tbl_QueryBAL();
                DataSet      dsData          = objtbl_QueryBAL.Select_Data(objtbl_QueryProp, ref PageCount);

                txtName.Text      = Convert.ToString(dsData.Tables[0].Rows[0]["Surname"]) + " " + Convert.ToString(dsData.Tables[0].Rows[0]["SenderName"]);
                txtContactNo.Text = Convert.ToString(dsData.Tables[0].Rows[0]["ContactNo"]);
                txtEmail.Text     = Convert.ToString(dsData.Tables[0].Rows[0]["Email"]);
                txtAddress.Text   = Convert.ToString(dsData.Tables[0].Rows[0]["Address"]);
                txtSubject.Text   = Convert.ToString(dsData.Tables[0].Rows[0]["Subject"]);
                txtMessage.Text   = Convert.ToString(dsData.Tables[0].Rows[0]["SenderMessage"]);
                dtpDate.Value     = Convert.ToDateTime(dsData.Tables[0].Rows[0]["Date"]);

                objtbl_QueryProp.Address       = txtAddress.Text;
                objtbl_QueryProp.ContactNo     = txtContactNo.Text;
                objtbl_QueryProp.Date          = dtpDate.Value;
                objtbl_QueryProp.Email         = txtEmail.Text;
                objtbl_QueryProp.SenderMessage = txtMessage.Text;
                objtbl_QueryProp.SenderName    = txtName.Text;
                objtbl_QueryProp.Subject       = txtSubject.Text;
                objtbl_QueryProp.Surname       = "";
                objtbl_QueryProp.Status        = true;
                //objtbl_QueryProp.Date = DateTime.Today;
                objtbl_QueryBAL.InsertUpdate_Data(objtbl_QueryProp);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        public DataSet SeaarchData(string sSearchBy, string sSearchVal)
        {
            DataSet ds = new DataSet();

            try
            {
                tbl_QueryProp objtbl_QueryProp = new tbl_QueryProp();
                objtbl_QueryProp.SearchBy  = sSearchBy;
                objtbl_QueryProp.SearchVal = sSearchVal;

                objtbl_QueryProp.PageNo      = 1;
                objtbl_QueryProp.RecordCount = 10000;

                tbl_QueryBAL Objtbl_QueryBAL = new tbl_QueryBAL();
                int          PageCount       = 0;
                ds = Objtbl_QueryBAL.Search_Data(objtbl_QueryProp);
            }
            catch (Exception ex)
            {
                MessageBox.Show(Convert.ToString(ex.Message));
                this.objEventLoging.AppErrlog("Error In AnantMatrimony.frmMemberMaster.SeaarchData() " + ex.ToString());
            }
            return(ds);
        }