Exemplo n.º 1
0
 private void Label1_Click(object sender, EventArgs e)
 {
     if (!FromMainForm)
     {
         LoggerShow ls = new LoggerShow(logModel, userName, productName, ASIN, SKU, marketPlaceName, editUserName, appUserId);
         ls.Show();
         this.Close();
     }
 }
Exemplo n.º 2
0
        /* Открываем запись на редактирование */
        private void Dgv_Log_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            LoggerModel lm = new LoggerModel();

            if (dgv_Log.RowCount > 0 && e.RowIndex >= 0 && e.ColumnIndex >= 0)
            {
                for (int i = 0; i < logList.Count; i++)
                {
                    if (logList[i].RecordId == int.Parse(dgv_Log.Rows[e.RowIndex].Cells[0].Value.ToString()))
                    {
                        lm = logList[i];
                    }
                }

                string eUserName = "";
                int    euserId   = -1;

                for (int i = 0; i < logList.Count; i++)
                {
                    if (logList[i].RecordId == int.Parse(dgv_Log.Rows[e.RowIndex].Cells[0].Value.ToString()))
                    {
                        euserId = logList[i].EditUserId;
                    }
                }
                if (euserId != -1)
                {
                    for (int i = 0; i < uList.Count; i++)
                    {
                        if (uList[i].UserId == euserId)
                        {
                            eUserName = uList[i].Name;
                        }
                    }
                }

                LoggerShow ls = new LoggerShow(this, lm, dgv_Log.Rows[e.RowIndex].Cells[2].Value.ToString(), dgv_Log.Rows[e.RowIndex].Cells[4].Value.ToString(), dgv_Log.Rows[e.RowIndex].Cells[5].Value.ToString(), dgv_Log.Rows[e.RowIndex].Cells[6].Value.ToString(), dgv_Log.Rows[e.RowIndex].Cells[8].Value.ToString(), eUserName);

                timer1.Stop();
                ls.Show();
                this.Visible = false;
            }
        }