Ejemplo n.º 1
0
        //添加
        private void ToolStripMenuItemAdd_Click(object sender, System.EventArgs e)
        {
            ItemDetail fItemDetail = new ItemDetail();

            fItemDetail.SummaryInfo = DateTime.Now.ToShortDateString();
            if (fItemDetail.ShowDialog() == DialogResult.OK)
            {
                this.m_formPlanDataLayer.HandlePlanData(this.ListBoxPlan, Operate.Add, fItemDetail.SummaryInfo, fItemDetail.DetailInfo);
            }
        }
Ejemplo n.º 2
0
 //显示Item详细信息
 private void ListBoxComplete_DoubleClick(object sender, System.EventArgs e)
 {
     if (this.ListBoxComplete.SelectedItem != null)
     {
         String sDetailInfo = String.Empty;
         if (this.m_vFormPlanDataLayer.GetPlanData(this.ListBoxComplete, this.ListBoxComplete.SelectedItem.ToString(), ref sDetailInfo))
         {
             ItemDetail fItemDetail = new ItemDetail();
             fItemDetail.SummaryInfo = this.ListBoxComplete.SelectedItem.ToString();
             fItemDetail.DetailInfo  = sDetailInfo;
             fItemDetail.ReadOnly    = true;
             fItemDetail.ShowDialog();
         }
     }
 }
Ejemplo n.º 3
0
 //查看
 private void Check(ListBox lControl)
 {
     if (lControl.SelectedItem != null)
     {
         String sDetailInfo = String.Empty;
         if (this.m_formPlanDataLayer.GetPlanData(lControl, lControl.SelectedItem.ToString(), ref sDetailInfo))
         {
             ItemDetail fItemDetail = new ItemDetail();
             fItemDetail.SummaryInfo = lControl.SelectedItem.ToString();
             fItemDetail.DetailInfo  = sDetailInfo;
             if (fItemDetail.ShowDialog() == DialogResult.OK)
             {
                 if (lControl.SelectedItem.ToString() != fItemDetail.SummaryInfo)
                 {
                     MessageBox.Show(lControl, "不允许此类操作");
                     return;
                 }
                 this.m_formPlanDataLayer.HandlePlanData(lControl, Operate.Modify, fItemDetail.SummaryInfo, fItemDetail.DetailInfo);
             }
         }
     }
 }