Ejemplo n.º 1
0
        private void dgv_MSO_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            List <MSO_Model> MSOs = (List <MSO_Model>)dgv_MSO.DataSource;
            int currentRow        = dgv_MSO.CurrentRow.Index;

            updateMSOModel(currentRow);
            List <MSO_Model> list = new List <MSO_Model>();

            list.Add(model);
            ScheduleDatabaseClassLibrary.TableOps.TableGenerator <MSO_Model> tg = new ScheduleDatabaseClassLibrary.TableOps.TableGenerator <MSO_Model>();
            tg.List = list;
            DataTable dt = tg.table;

            ScheduleDatabaseClassLibrary.GlobalConfig.Connection.MSO_Update(dt);
        }
Ejemplo n.º 2
0
        private void btn_Save_Click(object sender, EventArgs e)
        {
            if (auditSuccess())
            {
                ATEscalationsModel model = new ATEscalationsModel();
                model.EscalationID   = txtEID.Text;
                model.Product        = collectProducts();
                model.FELeadXML      = collectLeads();
                model.ATEDescription = txt_Description.Text;
                model.ATEStatus      = cbo_Status.Text;
                model.ATEType        = cbo_Type.Text;
                model.Comments       = txt_Comments.Text;
                model.CTRNumber      = txt_CTRNumber.Text;
                model.DateReported   = dtp_DateReported.Value;
                if (GV.MODE == Mode.AddEscalation)
                {
                    model.ResolvedDate = new DateTime(1900, 1, 1, 0, 0, 0, 0);
                }
                else
                {
                    model.ResolvedDate = dtp_DateResolved.Value;
                }
                model.MSO              = cbo_MSO.Text;
                model.Quantity         = txt_Qty.Text;
                model.Resolution       = txt_Resolution.Text;
                model.PeopleSoftNumber = txt_PSNumber.Text;
                ScheduleDatabaseClassLibrary.TableOps.TableGenerator <ATEscalationsModel> dt =
                    new ScheduleDatabaseClassLibrary.TableOps.TableGenerator <ATEscalationsModel>();
                List <ATEscalationsModel> escalations = new List <ATEscalationsModel>();
                escalations.Add(model);
                dt.List = escalations;
                int success = 0;
                switch (GV.MODE)
                {
                case Mode.AddEscalation:
                    success = GlobalConfig.Connection.Escalations_Add(dt.table);

                    break;

                case Mode.SearchEscalation:
                    success = GlobalConfig.Connection.Escalation_Update(dt.table);
                    break;
                }
                if (success > 0)
                {
                    MessageBox.Show(model.EscalationID + " saved.");
                    btn_Save.Enabled = false;
                }
            }
        }