Ejemplo n.º 1
0
        private bool istxt(bool id)
        {
            if (ArchId <= 0)
            {
                MessageBox.Show("请重新选择案卷!");
                return(false);
            }
            if (!info.istxt(panel1))
            {
                MessageBox.Show("标题名称不能为空!");
                return(false);
            }

            string pages = Getpage();

            if (pages.Trim().Length <= 0)
            {
                MessageBox.Show("起始页码不能为空!");
                return(false);
            }
            int    p        = info.PagesWz;
            string pagestmp = "";

            if (id)
            {
                foreach (ListViewItem item in LvContents.Items)
                {
                    pagestmp = item.SubItems[p + 2].Text.ToString();
                    if (pages == pagestmp)
                    {
                        MessageBox.Show("页码已存在!");
                        return(false);
                    }
                }
            }
            else
            {
                int tmpID = 0;
                if (Mtmpid == 0)
                {
                    MessageBox.Show("请选择目录");
                    LvContents.Focus();
                    return(false);
                }
                foreach (ListViewItem item in LvContents.Items)
                {
                    pagestmp = item.SubItems[p + 2].Text.ToString();
                    tmpID    = Convert.ToInt32(item.SubItems[1].Text);
                    if (pagestmp == pages && tmpID != Mtmpid)
                    {
                        MessageBox.Show("起始页码已存在!");
                        return(false);
                    }
                }
            }
            return(true);
        }
Ejemplo n.º 2
0
 private void butEdit_Click(object sender, EventArgs e)
 {
     //if (ArchCheckZt < 1)
     //{
     if (ArchStat >= (int)T_ConFigure.ArchStat.质检完 && ArchCheckZt == 0)
     {
         MessageBox.Show("案卷已经质检完成无法修改目录");
         return;
     }
     // }
     ContentsEdit();
     if (this.LvContents.Items.Count > 0)
     {
         if (CrragePage < this.LvContents.Items.Count)
         {
             LvContents.Items[CrragePage].Selected = true;
             LvContents.Items[CrragePage].EnsureVisible();
         }
         LvContents.Focus();
     }
 }