Ejemplo 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;
            }
        }
Ejemplo n.º 2
0
        private void simpleButton3_Click(object sender, EventArgs e)
        {
            FrmProjTZEdit frm = new FrmProjTZEdit();

            frm.Currentptb = Currentptb;
            spinEdit3.Text = Currentptb.AllVolumn.ToString();
            if (frm.ShowDialog() == DialogResult.OK)
            {
                Currentptb      = frm.Currentptb;
                ChangeStatetime = true;
                if (!Changetzflag)
                {
                    switch (combState.Text)
                    {
                    case "可行性研究":
                        sptz.Value = Changetz((Currentptb.Col6 == null || Currentptb.Col6 == "") ? "" : Currentptb.Col6);
                        break;

                    case "初步设计":
                        sptz.Value = Changetz((Currentptb.Col7 == null || Currentptb.Col7 == "") ? "" : Currentptb.Col7);
                        break;

                    case "施工设计":
                        sptz.Value = Changetz((Currentptb.Col8 == null || Currentptb.Col8 == "") ? "" : Currentptb.Col8);
                        break;

                    case "移交":
                        sptz.Value = Changetz((Currentptb.Col9 == null || Currentptb.Col9 == "") ? "" : Currentptb.Col9);
                        break;

                    default:

                        break;
                    }
                }
            }
        }