コード例 #1
0
        //-------------------------------------------------------------------------------
        //--------------------------- Insert Grievance Details --------------------------

        private void buttonsubmit_Click(object sender, EventArgs e)
        {
            Grievance objGrievance = null;

            objGrievance = new Grievance();
            int output = 0;

            try
            {
                objGrievance.GrievanceID     = textBoxGrievanceID.Text;
                objGrievance.CustomerId      = textBoxcustomerid.Text;
                objGrievance.GrievanceDetail = richTextBoxGrievance.Text;
                objGrievance.Title           = textBoxTitle.Text;
                objGrievance.Status          = "Submitted";

                DateTime today = DateTime.Today;
                output = GrievanceBL.InsertGrievanceDetails(objGrievance);

                if (output > 0)
                {
                    MessageBox.Show("DATA ADDED SUCCESSFULLY");
                }
                else
                {
                    MessageBox.Show("INSERTION FAILED");
                }
            }
            catch (Exception ex)
            {
                Console.Out.WriteLine(ex.Message.ToString());
            }
        }
コード例 #2
0
        private void comboBoxAction_SelectedIndexChanged(object sender, EventArgs e)
        {
            Grievance objectGrievance = new Grievance();

            objectGrievance.Status      = comboBoxAction.Text;
            objectGrievance.GrievanceID = textBoxGrievanceid.Text;

            GrievanceBL.InsertStatus(objectGrievance);
        }
コード例 #3
0
        //----------------------------------------------------------------------------------------------
        //----------------------- Action for Search By ComboBox -------------------------------------

        private void searchField_TextChanged(object sender, EventArgs e)
        {
            try
            {
                string searchBy = "";
                string category = "";
                searchBy = comboBoxSearchBy.Text;
                if (searchBy == "Grievance ID")
                {
                    category = "grievanceID";
                }
                else if (searchBy == "Customer ID")
                {
                    category = "customerId";
                }
                else if (searchBy == "Account Number")
                {
                    category = "accountNumber";
                }
                else if (searchBy == "Customer Name")
                {
                    category = "customerName";
                }

                string  like = searchField.Text;
                DataSet dsGrievance;
                dsGrievance = GrievanceBL.GetGrievanceLike(category, like);
                if (dsGrievance != null)
                {
                    dataGridGriev.DataSource = dsGrievance.Tables[0];
                }
                if (dsGrievance.Tables[0].Rows.Count < 1)
                {
                    string            title   = "Grievance System";
                    string            message = "No Details Available in Grievance Record";
                    MessageBoxButtons buttons = MessageBoxButtons.RetryCancel;
                    DialogResult      result  = MessageBox.Show(message, title, buttons, MessageBoxIcon.Error);
                    if (result == DialogResult.Retry)
                    {
                        searchField.Clear();
                    }
                }
            }

            catch (Exception ex)
            {
                labelMessage.Text = ex.Message.ToString();
            }
        }
コード例 #4
0
        //----------------------------------------------------------------------------------------------
        //----------------------- Load Grievance Details -----------------------------------------------

        private void LoadGrievanceApplications()
        {
            DataSet dsLoans = null;

            try
            {
                dsLoans = GrievanceBL.GetBasicGrievanceDetails();

                if (dsLoans != null)
                {
                    dataGridGriev.DataSource = dsLoans.Tables[0];
                }
                else
                {
                    labelMessage.Text = "No Data Available!";
                }
            }
            catch (Exception ex)
            {
                Console.Out.WriteLine(ex.Message.ToString());
            }
        }
コード例 #5
0
 private void Grievance_Redressal_Application_Load(object sender, EventArgs e)
 {
     textBoxGrievanceID.Text = GrievanceBL.GetNewGrievanceId().ToString();
 }