Exemple #1
0
    protected void btnListar_Click(object sender, EventArgs e)
    {
        DataSet dsReunion = proxy.WebLeerReunionds();

        GridLis.DataSource = dsReunion.Tables[0];
        GridLis.DataBind();
    }
Exemple #2
0
        protected override void billDel()
        {
            if (string.IsNullOrWhiteSpace(docBILLNO.Text))
            {
                Alert.Show("单据为空,无法执行【删除操作】");
                return;
            }
            string strFLAG = docFLAG.SelectedValue;

            if (strFLAG != "M")
            {
                Alert.Show("单据号【" + docBILLNO.Text + "】状态不正确,无法执行【删除】操作。");
                return;
            }
            DbHelperOra.Exists(string.Format("delete from dat_yh_doc where seqno = '{0}'", docBILLNO.Text));
            DbHelperOra.Exists(string.Format("delete from dat_yh_com where seqno = '{0}'", docBILLNO.Text));
            Alert.Show("单据号【" + docBILLNO.Text + "】删除成功");
            OperLog("在库养护", "删除单据【" + docBILLNO.Text + "】");
            //btnSear_Click(null, null);
            PubFunc.FormDataClear(Formlis);

            GridLis.DataSource = null;
            GridLis.DataBind();

            btnSear_Click(null, null);
        }
Exemple #3
0
        protected override void billDelRow()
        {
            if (string.IsNullOrWhiteSpace(docBILLNO.Text))
            {
                Alert.Show("空单据,无法进行【删行】操作");
                return;
            }
            if (docFLAG.SelectedValue != "M")
            {
                Alert.Show("非新单,不能进行【删行】操作!");
                return;
            }
            if (GridLis.SelectedCell == null)
            {
                return;
            }
            int rowIndex = GridLis.SelectedRowIndex;

            if (rowIndex < 0)
            {
                return;
            }

            PageContext.RegisterStartupScript(Confirm.GetShowReference("确认要对第【" + (rowIndex + 1) + "】行进行【删行】的操作吗?", "警告提示",
                                                                       MessageBoxIcon.Information, PageManager1.GetCustomEventReference("billDelRow_Ok"),
                                                                       PageManager1.GetCustomEventReference("billDelRow_Cancel"))); //,true

            //20150510 liuz
            List <Dictionary <string, object> > newDict = GridLis.GetNewAddedList();

            newDict.RemoveAt(rowIndex);
        }
    protected void btnListar_Click(object sender, EventArgs e)
    {
        DataSet dsDocente = proxy.WebLeerDocentes();

        GridLis.DataSource = dsDocente.Tables[0];
        GridLis.DataBind();
    }
    protected void btnListar_Click(object sender, EventArgs e)
    {
        DataSet dsActividad = proxy.WebLeerActividadds();

        GridLis.DataSource = dsActividad.Tables[0];
        GridLis.DataBind();
    }
Exemple #6
0
        protected void billOpen(string DEPTID, string Pssid, string datestart, string dateend)
        {
            //表头赋值
            dpkBEGRQ.SelectedDate   = Convert.ToDateTime(datestart);
            ddlDEPTID.SelectedValue = DEPTID;
            dpkENDRQ.SelectedDate   = Convert.ToDateTime(dateend);
            ddlSUPID.SelectedValue  = Pssid;
            string strComSql = "";

            if (Request.QueryString["oper"].ToString() == "rk")
            {
                strComSql = @"SELECT A.*,f_getusername(NVL(B.LRY,C.LRY)) LRYNAME,f_getusername(NVL(B.SHR,C.SHR)) SHRNAME,NVL(B.LRRQ,C.LRRQ) LRRQ,NVL(B.SHRQ,C.SHRQ) SHRQ FROM
                            (SELECT A.BILLNO,A.BILLTYPE,F_GET_BILLTYPENAME(BILLTYPE) BILLTYPENAME,f_getdeptname(A.DEPTID) DEPTNAME,SUM(A.JSJE + A.THJE) JE,A.PSSID
                            FROM VIEW_JS A WHERE A.DEPTID = '{0}' AND A.RQSJ BETWEEN TO_DATE('{1}','yyyy-MM-dd') AND TO_DATE('{2}','yyyy-MM-dd') + 1 AND A.TYPE = 'RKJ' AND NVL(A.STR1,'#') = '#'
                            GROUP BY A.BILLNO,A.BILLTYPE,A.DEPTID,A.PSSID) A,DAT_RK_DOC B,DAT_TH_DOC C
                            WHERE A.BILLNO = B.SEQNO(+) AND A.BILLNO = C.SEQNO(+) AND A.PSSID = '{3}' ";
            }
            else if (Request.QueryString["oper"].ToString() == "ck")
            {
                strComSql = @"SELECT A.*,f_getusername(NVL(NVL(B.LRY,C.LRY),D.LRY)) LRYNAME,f_getusername(NVL(NVL(B.SHR,C.SHR),D.SHR)) SHRNAME,NVL(NVL(B.LRRQ,C.LRRQ),D.LRRQ) LRRQ,NVL(NVL(B.SHRQ,C.SHRQ),D.SHRQ) SHRQ FROM
                            (SELECT A.BILLNO,A.BILLTYPE,F_GET_BILLTYPENAME(BILLTYPE) BILLTYPENAME,f_getdeptname(A.DEPTID) DEPTNAME,SUM(A.JSJE + A.THJE) JE,A.PSSID
                            FROM VIEW_JS A WHERE A.DEPTID = '{0}' AND A.RQSJ BETWEEN TO_DATE('{1}','yyyy-MM-dd') AND TO_DATE('{2}','yyyy-MM-dd') + 1 AND A.TYPE = 'CKJ' AND NVL(A.STR1,'#') = '#'
                            GROUP BY A.BILLNO,A.BILLTYPE,A.DEPTID,A.PSSID) A,DAT_CK_DOC B,DAT_KD_DOC C,DAT_XS_DOC D
                            WHERE A.BILLNO = B.SEQNO(+) AND A.BILLNO = C.SEQNO(+)  AND A.BILLNO = D.SEQNO(+) AND A.PSSID = '{3}' ";
            }
            else
            {
                strComSql = @"SELECT A.*,f_getusername(B.LRY) LRYNAME,f_getusername(B.SHR) SHRNAME,B.LRRQ LRRQ,B.SHRQ SHRQ FROM
                            (SELECT A.BILLNO,A.BILLTYPE,F_GET_BILLTYPENAME(BILLTYPE) BILLTYPENAME,f_getdeptname(A.DEPTID) DEPTNAME,SUM(A.JSJE + A.THJE) JE,A.PSSID
                            FROM VIEW_JS A WHERE A.DEPTID = '{0}' AND A.RQSJ BETWEEN TO_DATE('{1}','yyyy-MM-dd') AND TO_DATE('{2}','yyyy-MM-dd') + 1  AND A.TYPE = 'XSJ' AND NVL(A.STR1,'#') = '#'
                            GROUP BY A.BILLNO,A.BILLTYPE,A.DEPTID,A.PSSID) A,DAT_XS_DOC B
                            WHERE A.BILLNO = B.SEQNO(+) AND A.PSSID = '{3}' ";
            }
            //表体赋值
            DataTable dtBill = DbHelperOra.Query(string.Format(strComSql, DEPTID, datestart, dateend, Pssid)).Tables[0];

            GridLis.DataSource = dtBill;
            GridLis.DataBind();
            //计算合计数量
            decimal bzslTotal = 0;

            foreach (DataRow row in dtBill.Rows)
            {
                bzslTotal += Convert.ToDecimal(row["JE"]);
            }
            JObject summary = new JObject();

            summary.Add("BILLNO", "本页合计");
            summary.Add("JE", bzslTotal.ToString("F2"));
            GridLis.SummaryData      = summary;
            TabStrip1.ActiveTabIndex = 1;
        }
Exemple #7
0
        protected override void billNew()
        {
            PubFunc.FormDataClear(Formlis);
            ddlYHY.SelectedValue = UserAction.UserID;
            ddlLRY.SelectedValue = UserAction.UserID;
            dpkYHRQ.SelectedDate = DateTime.Now;
            dpkLRRQ.SelectedDate = DateTime.Now;

            PubFunc.FormLock(Formlis, false);
            ddlLRY.Enabled  = false;
            dpkLRRQ.Enabled = false;
            ddlSHR.Enabled  = false;
            dpkSHRQ.Enabled = false;
            docFLAG.Enabled = false;

            GridLis.SummaryData = null;
            PageContext.RegisterStartupScript(GridLis.GetRejectChangesReference());
        }
Exemple #8
0
        protected bool DataSave(string flag = "N")
        {
            if (docFLAG.SelectedValue != "N")
            {
                Alert.Show("非[已提交]不能保存!", "消息提示", MessageBoxIcon.Warning);
                return(false);
            }
            List <Dictionary <string, object> > goodsData = GridLis.GetNewAddedList().OrderBy(x => x["GDSEQ"]).ToList();

            if (goodsData.Count < 1)
            {
                Alert.Show("请添加要生成养护单的商品信息!", "提示信息", MessageBoxIcon.Warning);
                return(false);
            }

            List <CommandInfo> cmdList = new List <CommandInfo>();

            if (PubFunc.StrIsEmpty(docSEQNO.Text))
            {
                docSEQNO.Text  = BillSeqGet();
                docBILLNO.Text = docSEQNO.Text;
            }
            else
            {
                if (docBILLNO.Text.Length > 16)
                {
                    Alert.Show("单据编号长度不能大于16,请检查!", "消息提示", MessageBoxIcon.Warning);
                    return(false);
                }
                docSEQNO.Text = docBILLNO.Text;
            }
            cmdList.Add(new CommandInfo("delete from dat_yh_doc where seqno='" + docSEQNO.Text + "'", null));
            cmdList.Add(new CommandInfo("delete from dat_yh_com where seqno='" + docSEQNO.Text + "'", null));

            MyTable mtType = new MyTable("DAT_YH_DOC");

            mtType.ColRow = PubFunc.FormDataHT(Formlis);
            mtType.ColRow.Add("BILLTYPE", BillType);
            decimal decTotal = 0;
            MyTable mtTypeMx = new MyTable("DAT_YH_COM");

            //先删除单据信息在插入
            for (int i = 0; i < goodsData.Count; i++)
            {
                mtTypeMx.ColRow = PubFunc.GridDataGet(goodsData[i]);
                if (mtTypeMx.ColRow["REASON"].ToString().Length > 80)
                {
                    Alert.Show("第【" + i + 1 + "】行【原因说明】字段超出规定长度");
                    return(false);
                }

                mtTypeMx.ColRow.Add("SEQNO", docBILLNO.Text);
                mtTypeMx.ColRow["ROWNO"] = i + 1;
                mtTypeMx.ColRow.Add("PH", mtTypeMx.ColRow["PHID"]);
                decTotal += decimal.Parse(mtTypeMx.ColRow["HSJE"].ToString());
                mtTypeMx.ColRow.Remove("UNITNAME");
                mtTypeMx.ColRow.Remove("PRODUCERNAME");
                cmdList.Add(mtTypeMx.Insert());
            }
            mtType.ColRow.Add("SUBNUM", goodsData.Count);
            mtType.ColRow.Add("SUBSUM", decTotal);
            if (flag == "Y")
            {
                mtType.ColRow["FLAG"] = "Y";
                //mtType.ColRow["SHR"] = ddlSHR.SelectedValue;
                mtType.ColRow["SHR"]  = UserAction.UserID;
                mtType.ColRow["SHRQ"] = string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now);
            }
            cmdList.Add(mtType.Insert());
            return(DbHelperOra.ExecuteSqlTran(cmdList));
        }
Exemple #9
0
        private void billDelRow_mes()
        {
            int SelectedIndex = GridLis.SelectedRowIndex;

            PageContext.RegisterStartupScript(GridLis.GetDeleteRowReference(SelectedIndex));
        }
Exemple #10
0
        protected override void billOpen(string strBillno)
        {
            //表头进行赋值
            DataTable dtDoc = DbHelperOra.Query(strDocSql + string.Format(" AND SEQNO='{0}'", strBillno)).Tables[0];

            PubFunc.FormDataSet(Formlis, dtDoc.Rows[0]);
            PubFunc.FormLock(Formlis, true);
            string strFlag = DbHelperOra.GetSingle(string.Format(@"SELECT flag FROM DAT_YH_DOC WHERE SEQNO = '{0}'", strBillno)).ToString();

            hfdOper.Text = strFlag;
            if (strFlag == "M")
            {
                tbxMEMO.Enabled   = false;
                btnDelRow.Enabled = true;
                btnDel.Enabled    = true;
                btnSave.Enabled   = false;
                btnTJ.Enabled     = true;
                btnAudit.Enabled  = false;
                btnPrint.Enabled  = false;
            }
            else if (strFlag == "N")
            {
                tbxMEMO.Enabled   = true;
                btnDelRow.Enabled = false;
                btnDel.Enabled    = false;
                btnSave.Enabled   = true;
                btnTJ.Enabled     = false;
                btnAudit.Enabled  = true;
                btnPrint.Enabled  = true;
            }
            else
            {
                tbxMEMO.Enabled   = false;
                btnDelRow.Enabled = false;
                btnDel.Enabled    = false;
                btnSave.Enabled   = false;
                btnTJ.Enabled     = false;
                btnAudit.Enabled  = false;
                btnPrint.Enabled  = false;
            }
            //表体赋值
            PageContext.RegisterStartupScript(GridLis.GetRejectChangesReference());
            decimal   bzslTotal = 0, feeTotal = 0;
            string    sql    = strComSql + string.Format(" AND SEQNO='{0}'", strBillno);
            DataTable dtBill = DbHelperOra.Query(sql).Tables[0];

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

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

            TabStrip1.ActiveTabIndex = 2;
        }