예제 #1
0
 /// <summary>
 /// 盖公章
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnCheck2_Click(object sender, EventArgs e)
 {
     lbArcGZ.Text = "CachetImage.aspx?id=" + hiGZ.Value.Trim();
     btnCheck2.Visible = false;
     archives arcNew = null;
     if (lbArcCD.Text.Length > 0)
     {
         arcNew = arcClass.getArchives(long.Parse(lbArcCD.Text));
     }
     else
     {
         arcNew = new archives();
     }
     arcNew.arGZ = lbArcGZ.Text;
     arcClass.saveArchives(arcNew);
     btnCheckDoc.Visible = true;
 }
예제 #2
0
        /// <summary>
        /// 保存
        /// </summary>
        protected void DSave()
        {
            Page.Validate("vgArc");
            if (IsValid)
            {
                archives arcDoc = new archives();
                if (lbArcCD.Text.Length > 0)
                {
                    arcDoc = arcClass.getArchives(lbArcCD.Text);
                }

                ///发文号
                arcDoc.arCode = TextBox1.Text;
                ///缓急
                arcDoc.arSB = DropDownList2.SelectedValue;
                //密级
                arcDoc.arST = DropDownList3.SelectedValue;
                //签发
                arcDoc.arIssue = Label4.Text;
                //会签
                arcDoc.arMI = Label5.Text;
                //主送
                arcDoc.arSend = TextBox14.Text;
                ///抄送
                arcDoc.arCopy = TextBox15.Text;
                ///拟稿单位
                arcDoc.arFU = TextBox9.Text;
                ///拟稿
                arcDoc.arFM = TextBox8.Text;
                ///核稿
                arcDoc.arDC = Label10.Text;
                ///印刷
                arcDoc.arPT = TextBox10.Text;
                ///效对
                arcDoc.arCheck = TextBox11.Text;
                ///份数
                arcDoc.arNum = TextBox12.Text;
                ///主 题 词
                arcDoc.arTC = TextBox16.Text;
                ///标  题
                arcDoc.arTitle = TextBox13.Text;
                arcClass.saveArchives(arcDoc);
            }
        }
예제 #3
0
        /// <summary>
        /// 数据加载绑定
        /// </summary>
        private void DBind()
        {
            archives arcDoc = null;
            flowlist flow = null;
            try
            {
                //修改
                if (iId > 0)
                {
                    arcDoc = arcClass.getArchives(iId);
                    if (arcDoc != null)
                    {
                        lbArcCD.Text = iId.ToString();
                        flow = flowClass.getFlow(arcDoc.flID);
                        lbFlowCD.Text = arcDoc.flID.ToString();
                        lbArcUser.Text = arcDoc.usID.ToString();
                        ///发文号
                        TextBox1.Text = arcDoc.arCode;
                        Label1.Text = TextBox1.Text;
                        ///缓急
                        DropDownList2.SelectedValue = arcDoc.arSB;
                        Label2.Text = arcDoc.arSB;
                        //密级
                        DropDownList3.SelectedValue = arcDoc.arST;
                        Label3.Text = arcDoc.arST;
                        //签发
                        Label4.Text = arcDoc.arIssue;
                        //会签
                        Label5.Text = arcDoc.arMI;
                        //主送
                        TextBox14.Text = arcDoc.arSend;
                        Label15.Text = arcDoc.arSend;
                        ///抄送
                        TextBox15.Text = arcDoc.arCopy;
                        Label16.Text = arcDoc.arCopy;
                        ///拟稿单位
                        TextBox9.Text = arcDoc.arFU;
                        Label8.Text = arcDoc.arFU;
                        ///拟稿
                        TextBox8.Text = arcDoc.arFM;
                        Label9.Text = arcDoc.arFM;
                        ///核稿
                        Label10.Text = arcDoc.arDC;
                        ///印刷
                        TextBox10.Text = arcDoc.arPT;
                        Label11.Text = arcDoc.arPT;
                        ///效对
                        TextBox11.Text = arcDoc.arCheck;
                        Label12.Text = arcDoc.arCheck;
                        ///份数
                        TextBox12.Text = arcDoc.arNum;
                        Label13.Text = arcDoc.arNum;
                        ///主 题 词
                        TextBox16.Text = arcDoc.arTC;
                        Label17.Text = arcDoc.arTC;
                        ///标  题
                        TextBox13.Text = arcDoc.arTitle;
                        Label14.Text = arcDoc.arTitle;
                        //公章
                        lbArcGZ.Text = arcDoc.arGZ;
                    }
                    isNew = true;
                }
                else//新的
                {
                    isNew = false;
                    flow = flowClass.getFlowbyWhere("flNum=1 and flType='1'");
                    if (flow == null)
                    {
                        Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "Error", "<script>alert('你没有流程,请添加流程');Window.location.href='FlowEdit.aspx';</script>");
                        return;
                    }
                    arcClass.ClearArchives(LoginId);
                    lbFlowCD.Text = flow.flID.ToString();
                    lbArcUser.Text = LoginId.ToString();
                    //StaffInfo vUser = userClass.getUser(arcDoc.usID);
                    StaffInfo vUser = userClass.getUser(LoginId);
                    try
                    {
                        Label8.Text = userClass.getDpt(vUser.DepartmentCode).DepartName;
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }

                    TextBox9.Text = Label8.Text;
                    Label9.Text = vUser.Name;
                    TextBox8.Text = Label9.Text;
                    arcDoc = new archives();
                    arcDoc.flID = flow.flID;
                    arcDoc.usID = LoginId;
                    arcDoc.arFU = Label8.Text;
                    arcDoc.arFM = Label9.Text;
                    arcDoc.arCtime = DateTime.Now;
                    arcDoc.arUtime = DateTime.Now;
                    lbArcCD.Text = arcClass.saveArchives(arcDoc).ToString();
                    //lbtnLookOld.Visible = false;
                }
                IBind(flow);
                DBindUp();
            }
            catch (Exception exc)
            {
                Page.ClientScript.RegisterClientScriptBlock(this.Page.GetType(), "Error", "<script>alert(错误:'" + exc.Message + "');window.location.href='ArcPendingRequest.aspx';</script>");
            }
        }
예제 #4
0
 /// <summary>
 /// 保存
 /// </summary>
 /// <param name="prmArchives"></param>
 public long saveArchives(archives prmArchives)
 {
     long _id = 0;
     if (prmArchives.arID > 0)
     {
         flieds = new NBear.Common.PropertyItem[]{
             archives._.arAccess,
             archives._.arCheck,
             archives._.arCheckMI,
             archives._.arCode,
             archives._.arContent,
             archives._.arCopy,
             archives._.arCtime,
             archives._.arDC,
             archives._.arFM,
             archives._.arFU,
             archives._.arGZ,
             archives._.arIssue,
             archives._.arMI,
             archives._.arNum,
             archives._.arPT,
             archives._.arSB,
             archives._.arSend,
             archives._.arST,
             archives._.arState,
             archives._.arTC,
             archives._.arTitle,
             archives._.arUtime,
             archives._.flID,
             archives._.sUsid,
             archives._.usID
         };
         values = new object[]{
             prmArchives.arAccess,
             prmArchives.arCheck,
             prmArchives.arCheckMI,
             prmArchives.arCode,
             prmArchives.arContent,
             prmArchives.arCopy,
             prmArchives.arCtime,
             prmArchives.arDC,
             prmArchives.arFM,
             prmArchives.arFU,
             prmArchives.arGZ,
             prmArchives.arIssue,
             prmArchives.arMI,
             prmArchives.arNum,
             prmArchives.arPT,
             prmArchives.arSB,
             prmArchives.arSend,
             prmArchives.arST,
             prmArchives.arState,
             prmArchives.arTC,
             prmArchives.arTitle,
             prmArchives.arUtime,
             prmArchives.flID,
             prmArchives.sUsid,
             prmArchives.usID
         };
         db.Update<archives>(flieds, values, archives._.arID == prmArchives.arID);
         _id = prmArchives.arID;
     }
     else
     {
         _id = db.Save<archives>(prmArchives);
     }
     return _id;
 }