Exemplo n.º 1
0
        private void simpleButton3_Click_1(object sender, EventArgs e)
        {
            FrmProjTimeEdit frm = new FrmProjTimeEdit();

            frm.Currentptb = Currentptb;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                Currentptb      = frm.Currentptb;
                ChangeStatetime = true;
                switch (combState.Text)
                {
                case "规划审查":
                    dateStateTime.Value = ChangeTime((Currentptb.Stime1 == null || Currentptb.Stime1 == "") ? "" : Currentptb.Stime1);
                    Currentptb.Stime1   = dateStateTime.Value.ToShortDateString();
                    break;

                case "可行性研究":
                    dateStateTime.Value = ChangeTime((Currentptb.Stime2 == null || Currentptb.Stime2 == "") ? "" : Currentptb.Stime2);
                    Currentptb.Stime2   = dateStateTime.Value.ToShortDateString();
                    break;

                case "获取支持文件":
                    dateStateTime.Value = ChangeTime((Currentptb.Stime3 == null || Currentptb.Stime3 == "") ? "" : Currentptb.Stime3);
                    Currentptb.Stime3   = dateStateTime.Value.ToShortDateString();
                    break;

                case "初步设计":
                    dateStateTime.Value = ChangeTime((Currentptb.Stime4 == null || Currentptb.Stime4 == "") ? "" : Currentptb.Stime4);
                    Currentptb.Stime4   = dateStateTime.Value.ToShortDateString();
                    break;

                case "施工设计":
                    dateStateTime.Value = ChangeTime((Currentptb.Stime5 == null || Currentptb.Stime5 == "") ? "" : Currentptb.Stime5);
                    Currentptb.Stime5   = dateStateTime.Value.ToShortDateString();
                    break;

                case "施工":
                    dateStateTime.Value = ChangeTime((Currentptb.Stime6 == null || Currentptb.Stime6 == "") ? "" : Currentptb.Stime6);
                    Currentptb.Stime6   = dateStateTime.Value.ToShortDateString();
                    break;

                case "投产运行":
                    dateStateTime.Value = ChangeTime((Currentptb.Stime7 == null || Currentptb.Stime7 == "") ? "" : Currentptb.Stime7);
                    Currentptb.Stime7   = dateStateTime.Value.ToShortDateString();
                    break;

                case "移交":
                    dateStateTime.Value = ChangeTime((Currentptb.Stime8 == null || Currentptb.Stime8 == "") ? "" : Currentptb.Stime8);
                    Currentptb.Stime8   = dateStateTime.Value.ToShortDateString();
                    break;

                default:
                    break;
                }
                ChangeStatetime = false;
            }
        }
Exemplo n.º 2
0
 private void simpleButton3_Click_1(object sender, EventArgs e)
 {
     FrmProjTimeEdit frm = new FrmProjTimeEdit();
     frm.Currentptb = Currentptb;
     if (frm.ShowDialog() == DialogResult.OK)
     {
         Currentptb = frm.Currentptb;
         ChangeStatetime = true;
         switch (combState.Text)
         {
             case "规划审查":
                 dateStateTime.Value = ChangeTime((Currentptb.Stime1 == null || Currentptb.Stime1 == "") ? "" : Currentptb.Stime1);
                 Currentptb.Stime1 = dateStateTime.Value.ToShortDateString();
                 break;
             case "可行性研究":
                 dateStateTime.Value = ChangeTime((Currentptb.Stime2 == null || Currentptb.Stime2 == "") ? "" : Currentptb.Stime2);
                 Currentptb.Stime2 = dateStateTime.Value.ToShortDateString();
                 break;
             case "获取支持文件":
                 dateStateTime.Value = ChangeTime((Currentptb.Stime3 == null || Currentptb.Stime3 == "") ? "" : Currentptb.Stime3);
                 Currentptb.Stime3 = dateStateTime.Value.ToShortDateString();
                 break;
             case "初步设计":
                 dateStateTime.Value = ChangeTime((Currentptb.Stime4 == null || Currentptb.Stime4 == "") ? "" : Currentptb.Stime4);
                 Currentptb.Stime4 = dateStateTime.Value.ToShortDateString();
                 break;
             case "施工设计":
                 dateStateTime.Value = ChangeTime((Currentptb.Stime5 == null || Currentptb.Stime5 == "") ? "" : Currentptb.Stime5);
                 Currentptb.Stime5 = dateStateTime.Value.ToShortDateString();
                 break;
             case "施工":
                 dateStateTime.Value = ChangeTime((Currentptb.Stime6 == null || Currentptb.Stime6 == "") ? "" : Currentptb.Stime6);
                 Currentptb.Stime6 = dateStateTime.Value.ToShortDateString();
                 break;
             case "投产运行":
                 dateStateTime.Value = ChangeTime((Currentptb.Stime7 == null || Currentptb.Stime7 == "") ? "" : Currentptb.Stime7);
                 Currentptb.Stime7 = dateStateTime.Value.ToShortDateString();
                 break;
             case "移交":
                 dateStateTime.Value = ChangeTime((Currentptb.Stime8 == null || Currentptb.Stime8 == "") ? "" : Currentptb.Stime8);
                 Currentptb.Stime8 = dateStateTime.Value.ToShortDateString();
                 break;
             default:
                 break;
         }
         ChangeStatetime = false;
     }
 }