Example #1
0
        protected override void billOpen(string strBillno)
        {
            //表头进行赋值
            DataTable dtDoc = DbHelperOra.Query(string.Format(strLisSQL, strBillno)).Tables[0];

            PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);
            //表体赋值
            DataTable dtBill = DbHelperOra.Query(string.Format(strDocSql, strBillno)).Tables[0];

            GridGoods.DataSource = dtBill;
            GridGoods.DataBind();
            TabStrip1.ActiveTabIndex = 1;
            //计算合计数量
            decimal bzslTotal = 0, feTotal = 0, feeTotal = 0;

            foreach (DataRow row in dtBill.Rows)
            {
                bzslTotal += Convert.ToDecimal(row["PRICE_HSJE"]);
                feeTotal  += Convert.ToDecimal(row["PRICE_RTN"]);
                feTotal   += Convert.ToDecimal(row["PRICE"]);
            }
            JObject summary = new JObject();

            summary.Add("BILLTYPENAME", "本页合计");
            summary.Add("PRICE_HSJE", bzslTotal.ToString("F2"));
            summary.Add("PRICE_RTN", feeTotal.ToString("F2"));
            summary.Add("PRICE", feTotal.ToString("F2"));
            GridGoods.SummaryData = summary;
        }
Example #2
0
        protected void billOpen(string strBillno)
        {
            string    strDocSql = "SELECT * FROM DAT_CK_DOC WHERE SEQNO='{0}'";
            string    strComSql = @"SELECT C.*, F_GETUNITNAME(C.UNIT) UNITNAME, F_GETSUPNAME(C.PRODUCER) PRODUCERNAME
                                            FROM DAT_CK_COM C
                                           WHERE SEQNO = '{0}'";
            DataTable dtDoc     = DbHelperOra.Query(string.Format(strDocSql, strBillno)).Tables[0];

            PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);

            DataTable dtBill = DbHelperOra.Query(string.Format(strComSql, strBillno)).Tables[0];

            GridGoods.DataSource = dtBill;
            GridGoods.DataBind();

            decimal bzslTotal = 0, feeTotal = 0;

            if (dtBill != null && dtBill.Rows.Count > 0)
            {
                foreach (DataRow row in dtBill.Rows)
                {
                    bzslTotal += Convert.ToDecimal(row["XSSL"] ?? "0");
                    feeTotal  += Convert.ToDecimal(row["HSJE"] ?? "0");
                }
            }
            //增加合计
            JObject summary = new JObject();

            summary.Add("GDNAME", "本页合计");
            summary.Add("XSSL", bzslTotal.ToString());
            summary.Add("HSJE", feeTotal.ToString("F2"));
            GridGoods.SummaryData = summary;
            PubFunc.FormLock(FormDoc, true, "");
            TabStrip1.ActiveTabIndex = 1;
        }
Example #3
0
        protected void cxsj(String strCode)
        {
            string strSql = string.Format("select * from DOC_SUPPLIER where SUPID='{0}'", strCode);

            DataTable dtProducer = DbHelperOra.Query(strSql).Tables[0];

            if (dtProducer.Rows.Count > 0)
            {
                PubFunc.FormDataSet(FormProducer, dtProducer.Rows[0]);
            }

            if (ddlFLAG.SelectedValue == "Y")
            {
                PubFunc.FormLock(FormProducer, true);
                btnSave.Enabled  = false;
                btnAudit.Enabled = false;
            }
            else
            {
                PubFunc.FormLock(FormProducer, false);
                btnAudit.Enabled = true;
                tbxSUPID.Enabled = false;
                btnSave.Enabled  = true;
            }

            ddlFLAG.Enabled = false;
            chkSTR1.Enabled = false;
        }
Example #4
0
        private void billOpen(string strBillno)
        {
            DataTable dtDoc = DbHelperOra.Query(string.Format(strDocSql, strBillno)).Tables[0];

            PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);
            decimal bzslTotal = 0, feeTotal = 0;

            if (dtDoc != null && dtDoc.Rows.Count > 0)
            {
                foreach (DataRow row in dtDoc.Rows)
                {
                    bzslTotal += Convert.ToDecimal(row["BZSL"]);
                    feeTotal  += Convert.ToDecimal(row["HSJJ"]) * Convert.ToDecimal(row["BZSL"]);
                }
            }
            //计算合计数量
            JObject summary = new JObject();

            summary.Add("GDNAME", "本页合计");
            summary.Add("BZSL", bzslTotal.ToString());
            summary.Add("HSJE", feeTotal.ToString("F2"));
            GridGoods.SummaryData = summary;

            DataTable dtCom = DbHelperOra.Query(string.Format(strComSql, strBillno)).Tables[0];

            GridGoods.DataSource = dtCom;
            GridGoods.DataBind();
        }
Example #5
0
        protected void GridQuestion_RowDoubleClick(object sender, GridRowClickEventArgs e)
        {
            if (GridQuestion.Rows.Count == 0)
            {
                return;
            }

            string    strSeq = ((FineUIPro.Grid)sender).Rows[e.RowIndex].Values[1].ToString();
            DataTable dt     = DbHelperOra.Query("SELECT * FROM PRO_QUESTION WHERE SEQ='" + strSeq + "'").Tables[0];

            PubFunc.FormDataSet(FormQuest, dt.Rows[0]);
            hfdISNEW.Text = "N";
            if (!string.IsNullOrWhiteSpace(dt.Rows[0]["IMAGE"].ToString()))
            {
                lnkImage.NavigateUrl = dt.Rows[0]["IMAGE"].ToString();
                lnkImage.Text        = dt.Rows[0]["IMAGE"].ToString();
                lnkImage.Hidden      = false;
            }
            else
            {
                lnkImage.Hidden = true;
            }
            if (hfdFlag.Text == "answer")
            {
                PubFunc.FormLock(FormQuest, true);
                fudIMAGE.Enabled        = false;
                ddlSTATUS.Enabled       = true;
                ddlDOUSER.SelectedValue = UserAction.UserID;
                ddlDOUSER.Enabled       = true;
                dpkDOTIME.SelectedDate  = DateTime.Now;
                dpkDOTIME.Enabled       = true;
                txaHOWDO.Enabled        = true;
            }
        }
Example #6
0
        protected override void billOpen(string strBillno)
        {
            //表头进行赋值
            DataTable dtDoc = DbHelperOra.Query(string.Format(strDocSql, strBillno)).Tables[0];

            PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);
            tgxGoods.Text            = "";
            TabStrip1.ActiveTabIndex = 1;
            if (ddlISPH.SelectedValue == "Y")
            {
                GridColumn PH = GridGoods.FindColumn("PH");
                PH.Hidden = false;
                GridColumn RQ_SC = GridGoods.FindColumn("RQ_SC");
                RQ_SC.Hidden = false;
                GridColumn YXQZ = GridGoods.FindColumn("YXQZ");
                YXQZ.Hidden = false;
            }
            else
            {
                GridColumn PH = GridGoods.FindColumn("PH");
                PH.Hidden = true;
                GridColumn RQ_SC = GridGoods.FindColumn("RQ_SC");
                RQ_SC.Hidden = true;
                GridColumn YXQZ = GridGoods.FindColumn("YXQZ");
                YXQZ.Hidden = true;
            }

            page(strBillno);
            if (ddlISSD.SelectedValue.Equals("N"))
            {
                btnSave.Enabled   = false;
                btnAudit.Enabled  = false;
                btnCancel.Enabled = false;
                btnPrint.Enabled  = false;
                btnSD.Enabled     = true;
                btnGoods.Enabled  = false;
                btnRept.Enabled   = false;
            }
            else if (ddlFLAG.SelectedValue == "N")
            {
                btnSave.Enabled   = true;
                btnAudit.Enabled  = true;
                btnCancel.Enabled = true;
                btnPrint.Enabled  = true;
                btnSD.Enabled     = false;
                btnGoods.Enabled  = true;
                btnRept.Enabled   = true;
            }
            else
            {
                btnSave.Enabled   = false;
                btnAudit.Enabled  = false;
                btnCancel.Enabled = false;
                btnPrint.Enabled  = true;
                btnSD.Enabled     = false;
                btnGoods.Enabled  = false;
                btnRept.Enabled   = false;
            }
            tgxGoods.Enabled = true;
        }
Example #7
0
 protected void billOpen(string strBillno, string DEPTID)
 {
     if (DEPTID.Length <= 0)
     {
         string sql = @"SELECT SEQNO,DEPTID,SUPID,BEGRQ,ENDRQ,LRY,FLAG,decode(FLAG,'Y','已审核','G','已付款','R','驳回','未结算') FLAGNAME,LRRQ,YJJJ,MEMO FROM dat_jsd_doc  WHERE SEQNO = '{0}' ORDER by SEQNO DESC";
         //表头进行赋值
         DataTable dtDoc = DbHelperOra.Query(string.Format(sql, strBillno)).Tables[0];
         PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);
         //表体赋值
         DataTable dtBill = DbHelperOra.Query(string.Format(strDocSql, strBillno)).Tables[0];
         GridGoods.DataSource = dtBill;
         GridGoods.DataBind();
         TabStrip1.ActiveTabIndex = 1;
         PubFunc.FormLock(FormDoc, true);
         Bill_create.Enabled = false;
     }
     else
     {
         //表头进行赋值
         DataTable dtDoc = DbHelperOra.Query(string.Format(strLisSQL, strBillno, DEPTID)).Tables[0];
         PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);
         //表体赋值
         DataTable dtBill = DbHelperOra.Query(string.Format(strDocSql, strBillno)).Tables[0];
         GridGoods.DataSource = dtBill;
         GridGoods.DataBind();
         TabStrip1.ActiveTabIndex = 1;
         PubFunc.FormLock(FormDoc, true);
         Bill_create.Enabled = false;
     }
 }
Example #8
0
        protected override void billOpen(string SEQNO)
        {
            //子页中表头赋值
            DataTable dtDoc = DbHelperOra.Query(string.Format(strLisSQL, SEQNO)).Tables[0];

            PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);
            //表体赋值
            DataTable dtBill = DbHelperOra.Query(string.Format(strDocSql, SEQNO)).Tables[0];

            GridGoods.DataSource = dtBill;
            GridGoods.DataBind();

            string flag = dtDoc.Rows[0]["FLAG"].ToString();

            if (flag.Equals("N"))
            {
                lisAudi.Enabled = true;
                lisBH.Enabled   = true;
            }
            else
            {
                lisAudi.Enabled = false;
                lisBH.Enabled   = false;
            }

            TabStrip1.ActiveTabIndex = 1;
        }
Example #9
0
        protected override void billOpen(string strBillno)
        {
            //表头进行赋值
            DataTable dtDoc = DbHelperOra.Query(string.Format(strDocSql, strBillno)).Tables[0];

            PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);
            //表体赋值
            DataTable dtBill = DbHelperOra.Query(string.Format(strLisSQL, strBillno)).Tables[0];

            PageContext.RegisterStartupScript(GridGoods.GetRejectChangesReference());
            decimal bzslTotal = 0, feeTotal = 0, ddslTotal = 0;

            if (dtBill != null && dtBill.Rows.Count > 0)
            {
                foreach (DataRow row in dtBill.Rows)
                {
                    //PubFunc.GridRowAdd(GridGoods, row, false);
                    ddslTotal += Convert.ToDecimal(row["SYSL"]);
                    bzslTotal += Convert.ToDecimal(row["SYHSJE"]);
                    feeTotal  += Convert.ToDecimal(row["SYBHSJE"]);
                }
                Doc.GridRowAdd(GridGoods, dtBill);
            }
            TabStrip1.ActiveTabIndex = 1;
            PubFunc.Form2Lock(FormDoc, true);
            //增加合计
            JObject summary = new JObject();

            summary.Add("NAME", "本页合计");
            summary.Add("SYSL", ddslTotal.ToString());
            summary.Add("SYHSJE", bzslTotal.ToString("F2"));
            summary.Add("SYBHSJE", feeTotal.ToString("F2"));
            GridGoods.SummaryData = summary;
            //按钮状态判断
            if (ddlFLAG.SelectedValue == "N")
            {
                btnDel.Enabled    = true;
                btnSave.Enabled   = true;
                btnAudit.Enabled  = true;
                btnDelRow.Enabled = true;
                btnPrint.Enabled  = true;
            }
            else if (ddlFLAG.SelectedValue == "Y")
            {
                btnDel.Enabled    = false;
                btnSave.Enabled   = false;
                btnAudit.Enabled  = true;
                btnDelRow.Enabled = false;
                btnPrint.Enabled  = false;
            }
            else
            {
                btnDel.Enabled    = false;
                btnSave.Enabled   = false;
                btnAudit.Enabled  = false;
                btnDelRow.Enabled = false;
                btnPrint.Enabled  = false;
            }
        }
Example #10
0
        protected void GridToDoType_RowDoubleClick(object sender, FineUIPro.GridRowClickEventArgs e)
        {
            hfdIsNew.Text     = "N";
            tbxDOTYPE.Enabled = false;
            string    seq = GridToDoType.Rows[e.RowIndex].Values[0].ToString();
            DataTable dt  = DbHelperOra.Query("select * from DAT_DO_TYPE where dotype='" + seq + "'").Tables[0];

            PubFunc.FormDataSet(FormDoType, dt.Rows[0]);
        }
Example #11
0
        protected override void billOpen(string strBillno)
        {
            DataTable dtDoc = DbHelperOra.Query(string.Format(strDocSql, strBillno)).Tables[0];

            PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);

            PageContext.RegisterStartupScript(GridGoods.GetRejectChangesReference());
            //decimal bzslTotal = 0, feeTotal = 0;
            DataTable dtBill = DbHelperOra.Query(string.Format(strComSql, strBillno)).Tables[0];

            if (dtBill != null && dtBill.Rows.Count > 0)
            {
                Doc.GridRowAdd(GridGoods, dtBill);
            }
            PubFunc.FormLock(FormDoc, true, "");

            if ((",M,R").IndexOf(docFLAG.SelectedValue) > 0)
            {
                btnPrint.Enabled  = false;
                btnDel.Enabled    = true;
                btnSave.Enabled   = true;
                btnDelRow.Enabled = true;
                btnGoods.Enabled  = true;
            }
            else if (docFLAG.SelectedValue == "N")
            {
                btnPrint.Enabled  = true;
                btnDel.Enabled    = false;
                btnSave.Enabled   = false;
                btnAudit.Enabled  = true;
                btnDelRow.Enabled = false;
                btnCancel.Enabled = true;
                btnGoods.Enabled  = false;
            }
            else if (docFLAG.SelectedValue == "Y")
            {
                btnPrint.Enabled  = true;
                btnDel.Enabled    = false;
                btnSave.Enabled   = false;
                btnAudit.Enabled  = false;
                btnDelRow.Enabled = false;
                btnCancel.Enabled = false;
                btnGoods.Enabled  = false;
            }
            else
            {
                btnPrint.Enabled  = false;
                btnDel.Enabled    = false;
                btnSave.Enabled   = false;
                btnAudit.Enabled  = false;
                btnDelRow.Enabled = false;
                btnCancel.Enabled = false;
                btnGoods.Enabled  = false;
            }

            TabStrip1.ActiveTabIndex = 1;
        }
Example #12
0
        protected override void billOpen(string strBillno)
        {
            DataTable dtDoc = DbHelperOra.Query(string.Format(strDocSql, strBillno)).Tables[0];

            PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);

            PageContext.RegisterStartupScript(GridGoods.GetRejectChangesReference());
            DataTable dtBill = DbHelperOra.Query(string.Format(strComSql, strBillno)).Tables[0];
            decimal   bzslTotal = 0, feeTotal = 0;

            if (dtBill != null && dtBill.Rows.Count > 0)
            {
                Doc.GridRowAdd(GridGoods, dtBill);
                foreach (DataRow row in dtBill.Rows)
                {
                    bzslTotal += Convert.ToDecimal(row["BZSL"]);
                    feeTotal  += Convert.ToDecimal(row["HSJJ"]) * Convert.ToDecimal(row["BZSL"]) * Convert.ToDecimal(row["BZHL"]);
                }
            }
            //计算合计数量
            JObject summary = new JObject();

            summary.Add("GDNAME", "本页合计");
            summary.Add("BZSL", bzslTotal.ToString());
            summary.Add("HSJE", feeTotal.ToString("F2"));
            GridGoods.SummaryData    = summary;
            TabStrip1.ActiveTabIndex = 1;
            //根据状态屏蔽按钮
            if (docFLAG.SelectedValue == "N")
            {
                docMEMO.Enabled   = true;
                btnPrint.Enabled  = false;
                btnDel.Enabled    = true;
                btnSave.Enabled   = true;
                btnAudit.Enabled  = true;
                btnDelRow.Enabled = true;
                btnGoods.Enabled  = true;
            }
            else if (docFLAG.SelectedValue == "Y")
            {
                btnPrint.Enabled  = true;
                btnDel.Enabled    = false;
                btnSave.Enabled   = false;
                btnAudit.Enabled  = false;
                btnDelRow.Enabled = false;
                btnGoods.Enabled  = false;
            }
            else
            {
                btnPrint.Enabled  = false;
                btnDel.Enabled    = false;
                btnSave.Enabled   = false;
                btnAudit.Enabled  = false;
                btnDelRow.Enabled = false;
            }
        }
Example #13
0
        protected override void billOpen(string strBillno)
        {
            DataTable dtDoc = DbHelperOra.Query(string.Format(strDocSql, strBillno)).Tables[0];

            if (dtDoc != null && dtDoc.Rows.Count > 0)
            {
                PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);
            }
            else
            {
                Alert.Show(string.Format("未在系统中查询到单据【{0}】!", strBillno), "消息提示", MessageBoxIcon.Warning);
                return;
            }

            PageContext.RegisterStartupScript(GridGoods.GetRejectChangesReference());
            decimal   bzslTotal = 0, feeTotal = 0;
            DataTable dtBill = DbHelperOra.Query(string.Format(strComSql, strBillno)).Tables[0];

            if (dtBill != null && dtBill.Rows.Count > 0)
            {
                foreach (DataRow row in dtBill.Rows)
                {
                    //LoadGridRow(row, false, "OLD");
                    bzslTotal += Convert.ToDecimal(row["BZSL"]);
                    feeTotal  += Convert.ToDecimal(row["HSJJ"]) * Convert.ToDecimal(row["BZSL"]);
                }
            }
            Doc.GridRowAdd(GridGoods, dtBill);
            //计算合计数量
            JObject summary = new JObject();

            summary.Add("GDNAME", "本页合计");
            summary.Add("BZSL", bzslTotal.ToString());
            summary.Add("HSJE", feeTotal.ToString("F2"));
            GridGoods.SummaryData = summary;
            PubFunc.FormLock(FormDoc, true, "");
            TabStrip1.ActiveTabIndex = 1;
            //判断按钮状态
            if (docFLAG.SelectedValue == "M")
            {
                btnSave.Enabled    = true;
                btnAudit.Enabled   = true;
                btnPrint.Enabled   = false;
                btnDelRow.Enabled  = true;
                btnGoods.Enabled   = true;
                tbxBARCODE.Enabled = true;
            }
            else
            {
                btnSave.Enabled   = false;
                btnAudit.Enabled  = false;
                btnPrint.Enabled  = true;
                btnDelRow.Enabled = false;
                btnGoods.Enabled  = false;
            }
        }
Example #14
0
        protected void GridShelf_RowDoubleClick(object sender, GridRowClickEventArgs e)
        {
            hfdIsNew.Text = "N";
            string strCode = GridShelf.Rows[e.RowIndex].Values[1].ToString();
            string strSql  = string.Format("SELECT * FROM DOC_HWZD WHERE HWID='{0}'", strCode);

            PubFunc.FormDataSet(FormShelf, DbHelperOra.Query(strSql).Tables[0].Rows[0]);

            tbxHWID.Enabled = false;
        }
Example #15
0
        protected void GridGoodsType_RowDoubleClick(object sender, FineUIPro.GridRowClickEventArgs e)
        {
            PubFunc.FormDataSet(FormGoodsType, GridGoodsType.Rows[e.RowIndex]);

            if (!string.IsNullOrWhiteSpace(GridGoodsType.Rows[e.RowIndex].Values[3].ToString()))
            {
                string getSelectedValue = DbHelperOra.GetSingle("select str1 from DOC_GOODSTYPE t where code='" + GridGoodsType.Rows[e.RowIndex].Values[0].ToString() + "'").ToString();
                cblSTR1.SelectedValueArray = getSelectedValue.Split(',');
            }
        }
Example #16
0
        protected void GridCFGBrief_RowDoubleClick(object sender, FineUIPro.GridRowClickEventArgs e)
        {
            string CODE   = GridCFGBrief.DataKeys[e.RowIndex][0].ToString();
            string USERID = GridCFGBrief.DataKeys[e.RowIndex][1].ToString();

            string    strSql = string.Format("SELECT CODE,USERID,STR2 FROM DOC_BRIEF_COM WHERE CODE='{0}' AND USERID='{1}'", CODE, USERID);
            DataTable dt     = DbHelperOra.Query(strSql).Tables[0];

            PubFunc.FormDataSet(FormConfig, dt.Rows[0]);
        }
Example #17
0
        protected void GridToBrief_RowDoubleClick(object sender, FineUIPro.GridRowClickEventArgs e)
        {
            hfdIsNew.Text = "N";
            string    strcode = GridToBrief.Rows[e.RowIndex].Values[0].ToString();
            DataTable dt      = DbHelperOra.Query("select * from DOC_BRIEF_DOC where code='" + strcode + "'").Tables[0];

            PubFunc.FormDataSet(FormBR, dt.Rows[0]);
            PubFunc.FormDataSet(FormCON, dt.Rows[0]);
            labSHOW.Text = "";
        }
Example #18
0
        protected override void billOpen(string strBillno)
        {
            string    StrSql = strDocSql + " AND A.SEQNO = '{0}'";
            DataTable dtDoc  = DbHelperOra.Query(string.Format(StrSql, strBillno)).Tables[0];

            PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);
            PageContext.RegisterStartupScript(GridGoods.GetRejectChangesReference());
            string    deptout = DbHelperOra.GetSingle("select deptout from DAT_DB_DOC t where seqno = '" + strBillno + "'").ToString();
            DataTable dtBill = DbHelperOra.Query(string.Format(strComSql, strBillno, deptout)).Tables[0];
            decimal   bzslTotal = 0, feeTotal = 0;

            if (dtBill != null && dtBill.Rows.Count > 0)
            {
                foreach (DataRow row in dtBill.Rows)
                {
                    bzslTotal += Convert.ToDecimal(row["BZSL"]);
                    feeTotal  += Convert.ToDecimal(row["BZSL"]) * Convert.ToDecimal(row["HSJJ"]) * Convert.ToDecimal(row["BZHL"]);
                    //LoadGridRow(row, false, "OLD");
                }

                /*
                 *  修 改 人 :袁鹏    修改时间:2015-03-20
                 *  信息说明:这种加载方法比LoadGridRow(row, false, "OLD")更高效
                 *  研发组织:威高讯通信息科技有限公司
                 */
                Doc.GridRowAdd(GridGoods, dtBill);
            }
            //增加合计
            JObject summary = new JObject();

            summary.Add("GDNAME", "本页合计");
            summary.Add("BZSL", bzslTotal.ToString());
            summary.Add("HSJE", feeTotal.ToString("F2"));
            GridGoods.SummaryData = summary;
            PubFunc.FormLock(FormDoc, true, "");
            GridGoods.AllowCellEditing = false;

            if (docFLAG.SelectedValue == "N" || docFLAG.SelectedValue == "R")
            {
                btnSave.Enabled   = true;
                btnDel.Enabled    = true;
                btnAudit.Enabled  = true;
                btnDelRow.Enabled = true;
                btnGoods.Enabled  = true;
            }
            else
            {
                btnDel.Enabled    = false;
                btnAudit.Enabled  = false;
                btnDelRow.Enabled = false;
                btnGoods.Enabled  = false;
                btnSave.Enabled   = false;
            }
            TabStrip1.ActiveTabIndex = 1;
        }
Example #19
0
        protected override void billOpen(string strBillno)
        {
            DataTable dtDoc = DbHelperOra.Query(string.Format(strDocSql, strBillno)).Tables[0];

            if (dtDoc != null && dtDoc.Rows.Count > 0)
            {
                PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);
            }
            else
            {
                Alert.Show("单据信息获取失败!!!", "警告提示", MessageBoxIcon.Warning);
                return;
            }

            PageContext.RegisterStartupScript(GridGoods.GetRejectChangesReference());
            DataTable dtBill = DbHelperOra.Query(string.Format(strComSql, strBillno)).Tables[0];
            decimal   bzslTotal = 0, feeTotal = 0, dhslTotal = 0;

            if (dtBill != null && dtBill.Rows.Count > 0)
            {
                foreach (DataRow row in dtBill.Rows)
                {
                    bzslTotal += Convert.ToDecimal(row["BZSL"] ?? "0");
                    feeTotal  += Convert.ToDecimal(row["BZSL"] ?? "0") * Convert.ToDecimal(row["HSJJ"] ?? "0");
                    dhslTotal += Convert.ToDecimal(row["BZSL"] ?? "0") * Convert.ToDecimal(row["BZHL"] ?? "0");
                    //LoadGridRow(row, false, "OLD");
                }

                /*
                 *  修 改 人 :袁鹏    修改时间:2015-03-20
                 *  信息说明:这种加载方法比LoadGridRow(row, false, "OLD")更高效
                 *  研发组织:威高讯通信息科技有限公司
                 */
                PubFunc.GridRowAdd(GridGoods, dtBill);
            }
            //增加合计
            JObject summary = new JObject();

            summary.Add("GDNAME", "本页合计");
            summary.Add("BZSL", bzslTotal.ToString());
            summary.Add("HSJE", feeTotal.ToString("F2"));
            summary.Add("DHSL", dhslTotal.ToString());
            GridGoods.SummaryData = summary;
            PubFunc.FormLock(FormDoc, true, "");
            TabStrip1.ActiveTabIndex = 1;
            if (docFLAG.SelectedValue == "F")
            {
                btnCancel.Enabled = false;
            }
            else
            {
                btnCancel.Enabled = true;
            }
        }
Example #20
0
        protected void GridIns_RowDoubleClick(object sender, FineUIPro.GridRowClickEventArgs e)
        {
            hfdRowIndex.Text = e.RowIndex.ToString();
            Int32 seq = e.RowIndex;

            PubFunc.FormDataSet(myFormShelf, ViewTable.Rows[seq]);
            ddllABC.SelectedValue     = ViewTable.Rows[seq]["ABC"].ToString();
            ddllHWZT.SelectedValue    = ViewTable.Rows[seq]["HWZT"].ToString();
            ddllKB.SelectedValue      = ViewTable.Rows[seq]["KB"].ToString();
            ddllMANAGER.SelectedValue = ViewTable.Rows[seq]["MANAGER"].ToString();
            ddllKFBH.SelectedValue    = ViewTable.Rows[seq]["KFBH"].ToString();
        }
Example #21
0
        protected void GridList_RowDoubleClick(object sender, GridRowClickEventArgs e)
        {
            string    strVersion = GridList.Rows[e.RowIndex].Values[2].ToString();
            string    strSql     = "SELECT A.*,TO_CHAR(UPTMEMO) UPTMEMO2 FROM SYS_VERSION A WHERE FLAG = 'Y' AND VERSION = '{0}'";
            DataTable dt         = DbHelperOra.Query(string.Format(strSql, strVersion)).Tables[0];

            //dt.Columns.Remove("UPTMEMO");
            //dt.Columns["UPTMEMO2"].ColumnName = "UPTMEMO";
            PubFunc.FormDataSet(FormList, dt.Rows[0]);
            hfdValue.Text   = "Y";
            tbxUPTMEMO.Text = dt.Rows[0]["UPTMEMO2"].ToString();
        }
Example #22
0
        protected void GridMange_RowDoubleClick(object sender, GridRowClickEventArgs e)
        {
            string    strDept = GridMange.Rows[e.RowIndex].Values[1].ToString();
            string    strType = GridMange.Rows[e.RowIndex].Values[3].ToString();
            string    strSql  = string.Format("SELECT A.* FROM DAT_WORK A WHERE A.DEPTID='{0}' AND A.TYPE = '{1}'", strDept, strType);
            DataTable dtMange = DbHelperOra.Query(strSql).Tables[0];

            if (dtMange.Rows.Count > 0)
            {
                PubFunc.FormDataSet(FormMange, dtMange.Rows[0]);
            }
        }
Example #23
0
        protected override void billOpen(string strBillno)
        {
            string strDocSql = "SELECT A.*,F_GETUSERNAME(A.SQR) SQRCN,F_GETUSERNAME(A.LRY) LRYCN,F_GETUSERNAME(A.SHR) SHRCN  FROM DAT_TJ_DOC A WHERE A.SEQNO ='{0}'";
            string strComSql = @"SELECT A.*, F_GETUNITNAME(A.UNIT) UNITNAME,F_GETPRODUCERNAME(B.PRODUCER) PRODUCERNAME,F_GETUNITNAME(B.UNIT) UNITNAME
                                              FROM DAT_TJ_COM A,DOC_GOODS B WHERE SEQNO ='{0}' AND A.GDSEQ = B.GDSEQ ORDER BY ROWNO";

            DataTable dtDoc = DbHelperOra.Query(string.Format(strDocSql, strBillno)).Tables[0];

            if (dtDoc != null && dtDoc.Rows.Count > 0)
            {
                PubFunc.FormDataSet(FormPrice, dtDoc.Rows[0]);
            }
            else
            {
                Alert.Show("单据信息获取失败!!!", "警告提示", MessageBoxIcon.Warning);
                return;
            }
            PubFunc.FormLock(FormPrice, true, "");
            if (docFLAG.SelectedValue == "M" || docFLAG.SelectedValue == "R")
            {
                btnSave.Enabled   = true;
                btnSubmit.Enabled = true;
                btnDelRow.Enabled = true;
                btnGoods.Enabled  = true;
                btnAudit.Enabled  = false;
                doxMEMO.Enabled   = true;
            }
            else if (docFLAG.SelectedValue == "N" || docFLAG.SelectedValue == "G")
            {
                btnSave.Enabled   = false;
                btnSubmit.Enabled = false;
                btnDelRow.Enabled = false;
                btnGoods.Enabled  = false;
                btnAudit.Enabled  = true;
            }
            else
            {
                btnSave.Enabled   = false;
                btnSubmit.Enabled = false;
                btnDelRow.Enabled = false;
                btnGoods.Enabled  = false;
                btnAudit.Enabled  = false;
            }
            PageContext.RegisterStartupScript(GridGoods.GetRejectChangesReference());
            DataTable dtBill = DbHelperOra.Query(string.Format(strComSql, strBillno)).Tables[0];

            if (dtBill != null && dtBill.Rows.Count > 0)
            {
                Doc.GridRowAdd(GridGoods, dtBill);
            }
            TabStrip1.ActiveTabIndex = 1;
        }
Example #24
0
        protected override void billOpen(string strBillno)
        {
            DataTable dtDoc = DbHelperOra.Query(string.Format(strDocSql, strBillno)).Tables[0];

            if (dtDoc == null || dtDoc.Rows.Count < 1)
            {
                return;
            }
            PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);

            PageContext.RegisterStartupScript(GridGoods.GetRejectChangesReference());
            decimal   bzslTotal = 0, feeTotal = 0, dhslTotal = 0;
            DataTable dtBill = DbHelperOra.Query(string.Format(strComSql, strBillno)).Tables[0];

            if (dtBill != null && dtBill.Rows.Count > 0)
            {
                foreach (DataRow row in dtBill.Rows)
                {
                    //LoadGridRow(row, false, "OLD");
                    bzslTotal += Convert.ToDecimal(row["BZSL"] ?? "0");
                    feeTotal  += Convert.ToDecimal(row["HSJJ"] ?? "0") * Convert.ToDecimal(row["BZSL"] ?? "0");
                    dhslTotal += Convert.ToDecimal(row["DHSL"] ?? "0");
                }
                Doc.GridRowAdd(GridGoods, dtBill);
            }
            //计算合计数量
            JObject summary = new JObject();

            summary.Add("GDNAME", "本页合计");
            summary.Add("BZSL", bzslTotal.ToString());
            summary.Add("HSJE", feeTotal.ToString("F2"));
            summary.Add("DHSL", dhslTotal.ToString());
            GridGoods.SummaryData = summary;
            PubFunc.FormLock(FormDoc, true, "");
            TabStrip1.ActiveTabIndex = 1;
            //按钮状态
            if (docFLAG.SelectedValue == "S")
            {
                btnSave.Enabled  = true;
                btnBill.Enabled  = true;
                btnPrint.Enabled = false;
                btnGoods.Enabled = true;
            }
            else
            {
                btnSave.Enabled  = false;
                btnBill.Enabled  = true;
                btnPrint.Enabled = true;
                btnGoods.Enabled = false;
            }
        }
Example #25
0
        protected void GridProducer_RowDoubleClick(object sender, FineUIPro.GridRowClickEventArgs e)
        {
            hfdIsNew.Text   = "N";
            tbxCODE.Enabled = false;
            string strCode = GridProducer.Rows[e.RowIndex].Values[0].ToString();
            string strSql  = string.Format("select * from DOC_PRODUCER where CODE='{0}'", strCode);

            DataTable dtProducer = DbHelperOra.Query(strSql).Tables[0];

            if (dtProducer.Rows.Count > 0)
            {
                PubFunc.FormDataSet(FormProducer, dtProducer.Rows[0]);
            }
        }
Example #26
0
 private void InitFrom(String strCode)
 {
     if (strCode == "")
     {
         PubFunc.FormDataClear(FormMx);
         ddlSJCODE.SelectedValue = "";
         tbxCode.Enabled         = true;
     }
     else
     {
         PubFunc.FormDataSet(FormMx, DbHelperOra.Query(SqlMx.Replace("@CODE", strCode)).Tables[0].Rows[0]);
         tbxCode.Enabled = false;
     }
 }
Example #27
0
        protected override void billOpen(string strBillno)
        {
            string    StrSql = strDocSql + " AND A.SEQNO = '{0}'";
            DataTable dtDoc  = DbHelperOra.Query(string.Format(StrSql, strBillno)).Tables[0];

            PubFunc.FormDataSet(FormDoc, dtDoc.Rows[0]);
            PageContext.RegisterStartupScript(GridGoods.GetRejectChangesReference());
            DataTable dtBill = DbHelperOra.Query(string.Format(strComSql, strBillno)).Tables[0];

            if (dtBill != null && dtBill.Rows.Count > 0)
            {
                Doc.GridRowAdd(GridGoods, dtBill);
            }
            PubFunc.FormLock(FormDoc, true, "");
            TabStrip1.ActiveTabIndex = 1;
            if (docFLAG.SelectedValue == "M")
            {
                //初始化按钮
                btnDel.Enabled    = true;
                btnSave.Enabled   = true;
                btnAudit.Enabled  = false;
                btnDelRow.Enabled = true;
                btnGoods.Enabled  = true;
                docMEMO.Enabled   = true;
                tbxREASON.Enabled = true;
                btnPrint.Enabled  = false;
                ButSubmit.Enabled = true;
            }
            else if (docFLAG.SelectedValue == "N")
            {
                btnDel.Enabled    = false;
                btnSave.Enabled   = false;
                btnAudit.Enabled  = true;
                btnDelRow.Enabled = false;
                btnGoods.Enabled  = false;
                btnPrint.Enabled  = false;
                ButSubmit.Enabled = false;
            }
            else if (docFLAG.SelectedValue == "Y")
            {
                //初始化按钮
                btnDel.Enabled    = false;
                btnSave.Enabled   = false;
                btnAudit.Enabled  = false;
                btnDelRow.Enabled = false;
                btnGoods.Enabled  = false;
                btnPrint.Enabled  = true;
                ButSubmit.Enabled = false;
            }
        }
Example #28
0
        protected void GridList_RowDoubleClick(object sender, GridRowClickEventArgs e)
        {
            if (GridList.SelectedRowIndexArray.Length < 1)
            {
                return;
            }
            int rowIndex = GridList.SelectedRowIndexArray[0];
            //表头赋值
            string    strSql = "select * from dat_jsd_fp where SEQNO = {0}";
            DataTable dtDoc  = DbHelperOra.Query(string.Format(strSql, GridList.DataKeys[rowIndex][1])).Tables[0];

            PubFunc.FormDataSet(Formlist, dtDoc.Rows[0]);
            lstSEQNO.Enabled = false;
        }
Example #29
0
        protected void GridSupplier_RowDoubleClick(object sender, GridRowClickEventArgs e)
        {
            tbxCODE.Enabled = false;
            hfdIsNew.Text   = "N";
            string strCode = GridSupplier.Rows[e.RowIndex].Values[1].ToString();
            string strSql  = string.Format("select * from doc_license where code='{0}'", strCode);

            DataTable dtProducer = DbHelperOra.Query(strSql).Tables[0];

            if (dtProducer.Rows.Count > 0)
            {
                PubFunc.FormDataSet(FormProducer, dtProducer.Rows[0]);
            }
        }
Example #30
0
        protected void cxsj(String strCode)
        {
            string strSql = string.Format("select * from DOC_SUPPLIER where SUPID='{0}'", strCode);

            DataTable dtProducer = DbHelperOra.Query(strSql).Tables[0];

            if (dtProducer.Rows.Count > 0)
            {
                PubFunc.FormDataSet(FormProducer, dtProducer.Rows[0]);
                tbxSUPPWD.Text = "";
                if (dtProducer.Rows[0]["STR1"].ToString() == "Y")
                {
                    chkSTR1.Checked = true;
                }
                else
                {
                    chkSTR1.Checked = false;
                }
            }

            if (ddlFLAG.SelectedValue == "Y")
            {
                PubFunc.FormLock(FormProducer, true);
                btnDelete.Enabled  = false;
                btnSave.Enabled    = false;
                btnAudit.Enabled   = false;
                btnUnAudit.Enabled = true;
            }
            else
            {
                PubFunc.FormLock(FormProducer, false);
                btnUnAudit.Enabled = false;
                btnAudit.Enabled   = true;
                btnDelete.Enabled  = true;
                tbxSUPID.Enabled   = false;
                btnSave.Enabled    = true;
                hfdIsNew.Text      = "N";
            }
            if (strCode == "00001" || strCode == "00002")
            {
                chkISDG.Enabled = false;
            }
            else
            {
                chkISDG.Enabled = true;
            }
            ddlFLAG.Enabled = false;
            chkSTR1.Enabled = false;
        }