コード例 #1
0
ファイル: frmIOForm.cs プロジェクト: zhp-apeng/HTMLTERP
        ///// <summary>
        ///// 查询
        ///// </summary>
        //public override void btnQuery_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        //base.btnQuery_Click(sender, e);
        //        this.GetCondtion();
        //        this.BindGrid();
        //    }
        //    catch (Exception E)
        //    {
        //        this.ShowMessage(E.Message);
        //    }
        //}
        ///// <summary>
        ///// 浏览
        ///// </summary>
        ///// <param name="sender"></param>
        ///// <param name="e"></param>
        //public override void btnBrowse_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        //base.btnBrowse_Click(sender, e);
        //        this.BaseFocusLabel.Focus();
        //        LoadIOFormWin(HTDataID, FormStatus.查询);
        //    }
        //    catch (Exception E)
        //    {
        //        this.ShowMessage(E.Message);
        //    }
        //}

        ///// <summary>
        ///// 提交
        ///// </summary>
        //public override void btnSubmit_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        //if (!FCommon.RightCheck(this.FormID, this.FormListAID, this.FormListBID, RightSub.审核1))
        //        //{
        //        //    this.ShowMessage("你没有此操作权限");
        //        //    return;
        //        //}

        //        //IOFormRule rule = new IOFormRule();
        //        //IOForm entity = new IOForm();
        //        //entity.ID = HTDataID;
        //        //entity.SelectByID();

        //        //rule.RSubmit(this.HTDataID, (int)ConfirmFlag.已提交, Common.GetFormListTopTypeByFormListID(entity.HeadType), entity.ID, entity.SubType);//入库/出库
        //        //FCommon.AddDBLog(this.Text, "提交", "ID:" + HTDataID.ToString(), "");
        //        //SetPosStatus(this.HTDataID);

        //        if (!FCommon.RightCheck(this.FormID, this.RightFormID, this.FormListAID, this.FormListBID, RightSub.新增))
        //        {
        //            this.ShowMessage("你没有此操作权限");
        //            return;
        //        }

        //        if (HTDataID == 0)
        //        {
        //            this.ShowMessage("请选择要操作的记录");
        //            return;
        //        }
        //        //if (!HTSubmitCheck(FormStatus.提交))
        //        //{
        //        //    return;
        //        //}

        //        //HTSubmit(HTDataTableName, HTDataID.ToString());


        //        IOFormRule rule = new IOFormRule();
        //        rule.RSubmit(HTDataID, (int)ConfirmFlag.已提交);

        //        FCommon.AddDBLog(this.Text, FormStatus.提交.ToString(), "ID:" + HTDataID, "");
        //        this.SetPosStatus(HTDataID);
        //    }
        //    catch (Exception E)
        //    {
        //        this.ShowMessage(E.Message);
        //    }
        //}
        ///// <summary>
        ///// 撤销提交
        ///// </summary>
        //public override void btnSubmitCancel_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        //if (!FCommon.RightCheck(this.FormID, this.FormListAID, this.FormListBID, RightSub.审核1))
        //        //{
        //        //    this.ShowMessage("你没有此操作权限");
        //        //    return;
        //        //}
        //        //IOFormRule rule = new IOFormRule();
        //        //IOForm entity = new IOForm();
        //        //entity.ID = this.HTDataID;
        //        //entity.SelectByID();
        //        //rule.RSubmit(this.HTDataID, (int)ConfirmFlag.未提交, Common.GetFormListTopTypeByFormListID(entity.HeadType), entity.ID, entity.SubType);
        //        //FCommon.AddDBLog(this.Text, "撤销提交", "ID:" + HTDataID.ToString(), "");
        //        //SetPosStatus(this.HTDataID);

        //        if (!FCommon.RightCheck(this.FormID, this.RightFormID, this.FormListAID, this.FormListBID, RightSub.新增))
        //        {
        //            this.ShowMessage("你没有此操作权限");
        //            return;
        //        }

        //        if (HTDataID == 0)
        //        {
        //            this.ShowMessage("请选择要操作的记录");
        //            return;
        //        }
        //        //if (!HTSubmitCheck(FormStatus.提交))
        //        //{
        //        //    return;
        //        //}

        //        //HTSubmit(HTDataTableName, HTDataID.ToString());


        //        IOFormRule rule = new IOFormRule();
        //        rule.RSubmit(HTDataID, (int)ConfirmFlag.未提交);

        //        FCommon.AddDBLog(this.Text, FormStatus.提交.ToString(), "ID:" + HTDataID, "");
        //        this.SetPosStatus(HTDataID);
        //    }
        //    catch (Exception E)
        //    {
        //        this.ShowMessage(E.Message);
        //    }
        //}
        ///// <summary>
        ///// 审核通过
        ///// </summary>
        //public override void btnAudit_Click(object sender, EventArgs e)
        //{
        //    base.btnAudit_Click(sender, e);
        //}
        ///// <summary>
        ///// 审核拒绝
        ///// </summary>
        //public override void btnAuditCancel_Click(object sender, EventArgs e)
        //{
        //    base.btnAuditCancel_Click(sender, e);
        //}

        ///// <summary>
        ///// 新增
        ///// </summary>
        //public override void btnInsert_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        //base.btnInsert_Click(sender, e);
        //        this.BaseFocusLabel.Focus();
        //        LoadIOFormWin(HTDataID, FormStatus.新增);
        //    }
        //    catch (Exception E)
        //    {
        //        this.ShowMessage(E.Message);
        //    }
        //}

        //public override void btnUpdate_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        //base.btnUpdate_Click(sender, e);
        //        this.BaseFocusLabel.Focus();
        //        LoadIOFormWin(HTDataID, FormStatus.修改);
        //    }
        //    catch (Exception E)
        //    {
        //        this.ShowMessage(E.Message);
        //    }
        //}

        ///// <summary>
        ///// 删除
        ///// </summary>
        ///// <param name="sender"></param>
        ///// <param name="e"></param>
        //public override void btnDelete_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        //base.btnDelete_Click(sender, e);
        //        this.BaseFocusLabel.Focus();
        //        if (HTDataID == 0)
        //        {
        //            this.ShowMessage("请选择要操作的记录");
        //            return;
        //        }
        //        if (DialogResult.Yes != this.ShowConfirmMessage("删除为不可恢复操作,确定删除"))
        //        {
        //            return;
        //        }

        //        IOForm entity = new IOForm();
        //        entity.ID = HTDataID;
        //        IOFormRule rule = new IOFormRule();
        //        rule.RDelete(entity);
        //        btnQuery_Click(null, null);
        //    }
        //    catch (Exception E)
        //    {
        //        this.ShowMessage(E.Message);
        //    }
        //}


        ///// <summary>
        ///// 转Excel
        ///// </summary>
        //public override void btnToExcel_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        //base.btnToExcel_Click(sender, e);
        //        this.ToExcel((GridView)gridControlDetail.MainView);
        //        FCommon.AddDBLog(this.Text, "导出报表", "", "");
        //    }
        //    catch (Exception E)
        //    {
        //        this.ShowMessage(E.Message);
        //    }
        //}
        #endregion

        #region 加载仓库单据
        /// <summary>
        /// 加载仓库单据
        /// </summary>
        /// <param name="p_IOFormID"></param>
        private void LoadIOFormWin(int p_IOFormID, FormStatus p_FormStatus)
        {
            string    sql           = "SELECT HeadType,SubType FROM WH_IOForm WHERE ID=" + SysString.ToDBString(p_IOFormID);
            DataTable dt            = SysUtils.Fill(sql);
            int       headtype      = 0;
            int       subtype       = 0;
            int       toptypeid     = 0;
            string    formClassName = string.Empty;

            if (dt.Rows.Count != 0)//
            {
                headtype = SysConvert.ToInt32(dt.Rows[0]["HeadType"]);
                subtype  = SysConvert.ToInt32(dt.Rows[0]["SubType"]);
            }
            else
            {
                headtype = this.FormListAID;
            }

            toptypeid = Common.GetFormListTopTypeByFormListID(this.FormListAID);
            switch (toptypeid)
            {
            case (int)WHFormList.入库:
                formClassName = "frmInWHEdit";
                //this.RightFormID = this.GetFormIDByClassName("frmInWHEdit");
                break;

            case (int)WHFormList.出库:
                formClassName = "frmOutWHEdit";
                break;

            //case (int)WHFormList.形态转换:
            //    formClassName = "frmTurnForm";
            //    break;
            case (int)WHFormList.期初入库:
                formClassName = "frmDefaultInWHEdit";
                //headtype = this.FormListAID;
                break;

            case (int)WHFormList.盘点:
                formClassName = "frmCheckWHEdit";
                //headtype = this.FormListAID;
                break;

            case (int)WHFormList.移库:
                formClassName = "frmMoveWHEdit";
                //headtype = this.FormListAID;
                break;
            }
            if (formClassName != string.Empty)
            {
                MDIForm.ContextMenuOpenForm(null, formClassName, headtype, 0, p_IOFormID.ToString(), p_FormStatus);
            }
        }
コード例 #2
0
 private void linkSearch_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     try
     {
         //timeOut.Enabled = true;
         LinkLabel link = (LinkLabel)sender;
         if (link.Tag.ToString() != string.Empty)
         {
             string[] linkinfor = ((string)link.Tag).Split(',');
             MDIForm.ContextMenuOpenForm(FUISourceObject.GetResultArrayList(FUISourceObject.SourceForm, this), linkinfor[0].ToString(), SysConvert.ToInt32(linkinfor[1]), SysConvert.ToInt32(linkinfor[2]), linkinfor[3].ToString(), FormStatus.查询);
             notifyIcon1.Visible = true;
             this.Hide();
         }
     }
     catch (Exception ex)
     {
         this.ShowMessage(ex.Message);
     }
 }
コード例 #3
0
 /// <summary>
 /// 转向目标页
 /// </summary>
 public void NavigateWin(string p_FormClassName, string p_ParentID, FormStatus p_MFormStatus)
 {
     MDIForm.ContextMenuOpenForm(FUISourceObject.GetResultArrayList(FUISourceObject.SourceForm, this), p_FormClassName, this.FormListAID, this.FormListBID, this.SubmitFlag, this.AuditFlag, p_ParentID, p_MFormStatus);
 }