Exemplo n.º 1
0
        private void gridItemsChoice_DoubleClick(object sender, EventArgs e)
        {
            DataRow dr = (gridDetailReport.MainView as GridView).GetFocusedDataRow();

            //gridReadinessView.GetFocusedDataRow();
            if (dr != null)
            {
                int itemId = Convert.ToInt32(dr["ID"]);
                int unitID = dr["UnitID"] != DBNull.Value ? Convert.ToInt32(dr["UnitID"]) : 0;
                dtDate.Value        = DateTimeHelper.ServerDateTime;
                dtDate.CustomFormat = "MM/dd/yyyy";
                _dtCur = ConvertDate.DateConverter(dtDate.Text);
                int month            = Convert.ToInt32(cboMonth.EditValue);
                int year             = (month < 11) ? Convert.ToInt32(cboYear.EditValue) : Convert.ToInt32(cboYear.EditValue);
                ItemDetailReport con = new ItemDetailReport(itemId, unitID, Convert.ToInt32(lkStore.EditValue), year);
                con.ShowDialog();
            }
        }
 private void gridItemsChoice_DoubleClick(object sender, EventArgs e)
 {
     DataRow dr = (gridDetailReport.MainView as GridView).GetFocusedDataRow();
         //gridReadinessView.GetFocusedDataRow();
     if (dr != null)
     {
         int itemId = Convert.ToInt32(dr["ID"]);
         int unitID = dr["UnitID"] != DBNull.Value ? Convert.ToInt32(dr["UnitID"]) : 0;
         dtDate.Value = DateTimeHelper.ServerDateTime;
         dtDate.CustomFormat = "MM/dd/yyyy";
         _dtCur = ConvertDate.DateConverter(dtDate.Text);
         int month = Convert.ToInt32(cboMonth.EditValue);
         int year = (month < 11) ? Convert.ToInt32(cboYear.EditValue) : Convert.ToInt32(cboYear.EditValue);
         ItemDetailReport con = new ItemDetailReport(itemId,unitID, Convert.ToInt32(lkStore.EditValue), year);
         con.ShowDialog();
     }
 }
        private void detailItemStatusToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!BLL.Settings.UseNewUserManagement ||
                (BLL.Settings.UseNewUserManagement && this.HasPermission("View-Item-Detail")))
            {

                DataRow dr = gridViewTransaction.GetFocusedDataRow();
                if (dr != null)
                {
                    int? unitID = null;
                    if (dr["UnitID"] != DBNull.Value)
                    {
                        unitID = Convert.ToInt32(dr["UnitID"]);
                    }
                    ItemDetailReport con = new ItemDetailReport(Convert.ToInt32(dr["ItemID"]), unitID,
                        Convert.ToInt32(dr["StoreID"]), 0);
                    con.ShowDialog();
                }
            }
        }