コード例 #1
0
        /// <summary>
        /// 创建发票,写入相关数据表中
        /// </summary>
        private void CreateInvOpDataBase(string fpbh)
        {
            List <string> sql       = new List <string>();
            string        fpcode    = fpbh;//发票编号
            string        jhgzhcode = "";

            //string[] arrayUniqCode = arrayJhgzh.Split('/');//计划跟踪号数组
            foreach (RepeaterItem Reitem in rptProNumCost.Items)
            {
                jhgzhcode = ((Label)Reitem.FindControl("lbjhgzh")).Text.Trim().ToString();
            }
            sql.Add(this.CreateInvTOTAL(jhgzhcode, fpcode));//发票总表,参数传递(结算单计划跟踪号(主要为从结算单获取供应商信息),发票编号)

            foreach (RepeaterItem Reitem in rptProNumCost.Items)
            {
                string Uniqcode = ((Label)Reitem.FindControl("lbjhgzh")).Text.Trim().ToString();
                sql.Add(this.CreateJSD(Uniqcode));                //更新结算单结算状态
                sql.Add(this.CreateGJrelation(Uniqcode, fpcode)); //更新勾稽关系表
            }



            //根据发票明细上的金额更新发票总表(总金额、含税金额)
            string str_je   = "update TBFM_YFFPTOTAL set YFGI_MONEY=(select sum(isnull(YFGJ_JE,0)) from TBFM_YFFPDETAIL where YFGJ_FPID='" + fpcode + "') where YFGI_CODE='" + fpcode + "'";
            string str_hsje = "update TBFM_YFFPTOTAL set YFGI_HSMONEY=(select sum(isnull(YFGJ_HSJE,0)) from TBFM_YFFPDETAIL where YFGJ_FPID='" + fpcode + "') where YFGI_CODE='" + fpcode + "'";

            sql.Add(str_je);
            sql.Add(str_hsje);
            DBCallCommon.ExecuteTrans(sql);
        }
コード例 #2
0
        //取消暂停
        protected void btn_qxzanting_Click(object sender, EventArgs e)
        {
            List <string> sql_list = new List <string>();
            string        sql      = "";
            string        ptc      = "";
            int           i        = 0;

            foreach (RepeaterItem Reitem in tbpc_pchsplanassign_listtRepeater.Items)
            {
                CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as CheckBox;//定义checkbox
                if (cbx.Checked)
                {
                    i++;
                    ptc = ((Label)Reitem.FindControl("PUR_PTCODE")).Text;
                    sql = "update TBPC_PURCHASEPLAN set Pue_Closetype=NULL,PUR_CSTATE='0' where PUR_PTCODE='" + ptc + "'";
                    sql_list.Add(sql);
                }
            }
            if (i == 0)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('请选择数据');", true);
                ModalPopupExtenderSearch.Hide();
                getArticle();
            }
            else
            {
                DBCallCommon.ExecuteTrans(sql_list);
                lb_CurrentPage.Text = "1";
                getArticle();
            }
        }
コード例 #3
0
        protected void btn_export_OnClick(object sender, EventArgs e)
        {
            int flag = ifselect();

            if (flag == 0)//判断是否有勾选框被勾选
            {
                string gdgzjldc = "";
                foreach (RepeaterItem Reitem in rptGDGZrecord.Items)
                {
                    System.Web.UI.WebControls.CheckBox cbx = Reitem.FindControl("cbxSelect") as System.Web.UI.WebControls.CheckBox;//定义checkbox
                    if (cbx.Checked)
                    {
                        gdgzjldc += "'" + ((System.Web.UI.WebControls.Label)Reitem.FindControl("lbID")).Text.ToString() + "'" + ",";
                    }
                }
                gdgzjldc = gdgzjldc.Substring(0, gdgzjldc.LastIndexOf(",")).ToString();
                string sqltext = "";
                sqltext = "select Person_GH,ST_NAME,DEP_NAME,(isnull(GDGZ,0)-isnull(tzedu,0)) as lastgdgz,tzedu,GDGZ,XGRST_NAME,XGTIME,NOTE from (select a.ID as ID,a.ST_ID as ST_ID,a.Person_GH as Person_GH,b.ST_NAME as ST_NAME,b.ST_DEPID as ST_DEPID,c.DEP_NAME as DEP_NAME,a.tzedu as tzedu,a.GDGZ as GDGZ,a.XGRST_NAME as XGRST_NAME,a.XGTIME as XGTIME,a.NOTE as NOTE from OM_GDGZrecord as a left join TBDS_STAFFINFO as b on a.ST_ID=b.ST_ID left join TBDS_DEPINFO as c on b.ST_DEPID = c.DEP_CODE)t where ID in(" + gdgzjldc + ") order by Person_GH,XGTIME";
                System.Data.DataTable dt = DBCallCommon.GetDTUsingSqlText(sqltext);
                ExportDataItem(dt);
            }
            else if (flag == 1)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('请选择要导出的数据!!!');", true);
            }
        }
コード例 #4
0
        protected void btn_addrow_Click(object sender, EventArgs e)
        {
            //CreateNewRow();
            string sqltext = "";
            string pno     = "";
            string ptcode  = "";
            string marid   = "";
            double length  = 0;
            double width   = 0;
            string sqcode  = "";

            foreach (RepeaterItem Reitem in tbpc_marrepkumrepeater.Items)
            {
                CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as CheckBox; //定义checkbox
                if (cbx != null)                                               //存在行
                {
                    if (cbx.Checked)
                    {
                        pno    = PNO.Text;
                        ptcode = YPTCODE.Text;
                        marid  = ((Label)Reitem.FindControl("MARID")).Text;
                        length = Convert.ToDouble(((Label)Reitem.FindControl("LENGTH")).Text == ""?"0":((Label)Reitem.FindControl("LENGTH")).Text);
                        width  = Convert.ToDouble(((Label)Reitem.FindControl("WIDTH")).Text == "" ?"0":((Label)Reitem.FindControl("WIDTH")).Text);
                        sqcode = ((Label)Reitem.FindControl("SQCODE")).Text;
                        //插入选中的材料记录到代用单代用材料记录表中
                        sqltext = "insert into TBPC_MARREPLACEDETAIL(MP_CODE,MP_PTCODE,MP_NEWMARID,MP_LENGTH,MP_WIDTH,MP_OLDSQCODE) " +
                                  "values ('" + pno + "','" + ptcode + "','" + marid + "','" + length + "','" + width + "','" + sqcode + "')";
                        DBCallCommon.ExeSqlText(sqltext);
                    }
                }
            }
            tbpc_puralldydetailRepeaterdatabind();
            tbpc_marrepkumrepeaterdatabind();
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('增加成功!');", true);
        }
コード例 #5
0
        protected void btn_export_Click(object sender, EventArgs e)
        {
            int flag = ifselect();

            if (flag == 0)//判断是否有勾选框被勾选
            {
                string rwhdc = "";
                foreach (RepeaterItem Reitem in rptProNumCost.Items)
                {
                    System.Web.UI.WebControls.CheckBox cbx = Reitem.FindControl("cbxSelect") as System.Web.UI.WebControls.CheckBox;//定义checkbox
                    if (cbx.Checked)
                    {
                        rwhdc += "'" + ((System.Web.UI.WebControls.Label)Reitem.FindControl("lbqjrwh")).Text.ToString() + "'" + ",";
                    }
                }
                rwhdc = rwhdc.Substring(0, rwhdc.LastIndexOf(",")).ToString();
                string sqltext = "";
                sqltext = "select PMS_TSAID as QJTSAID,cast(sum(ISNULL(AYTJ_JJFY,0)) as decimal(12,2)) as QJJJFY,cast(sum(ISNULL(AYTJ_JGYZFY,0)) as decimal(12,2)) as QJJGYZFY,cast((sum(ISNULL(AYTJ_JJFY,0))+sum(ISNULL(AYTJ_JGYZFY,0)))  as decimal(12,2)) as QJZJRGFXJ,cast(sum(ISNULL(PMS_01_01,0)) as decimal(12,2)) as QJBZJ,cast(sum(ISNULL(PMS_01_05,0)) as decimal(12,2)) as QJHCL,cast(sum(ISNULL(PMS_01_07,0)) as decimal(12,2)) as QJHSJS,cast(sum(ISNULL(PMS_01_08,0)) as decimal(12,2)) as QJZJ,cast(sum(ISNULL(PMS_01_09,0)) as decimal(12,2)) as QJDJ,cast(sum(ISNULL(PMS_01_10,0)) as decimal(12,2)) as QJZC,cast(sum(ISNULL(PMS_01_11,0)) as decimal(12,2)) as QJWGJ,cast(sum(ISNULL(PMS_01_15,0)) as decimal(12,2)) as QJYQTL,cast(sum(PMS_01_02+PMS_01_03+PMS_01_04+PMS_01_06+PMS_01_12+PMS_01_13+PMS_01_14+PMS_01_16+PMS_01_17+PMS_01_18+PMS_02_01+PMS_02_02+PMS_02_03+PMS_02_04+PMS_02_05+PMS_02_06+PMS_02_07+PMS_02_08+PMS_02_09) as decimal(12,2)) as QJQTCL,cast(sum(PMS_01_01+PMS_01_02+PMS_01_03+PMS_01_04+PMS_01_05+PMS_01_06+PMS_01_07+PMS_01_08+PMS_01_09+PMS_01_10+PMS_01_11+PMS_01_12+PMS_01_13+PMS_01_14+PMS_01_15+PMS_01_16+PMS_01_17+PMS_01_18+PMS_02_01+PMS_02_02+PMS_02_03+PMS_02_04+PMS_02_05+PMS_02_06+PMS_02_07+PMS_02_08+PMS_02_09) as decimal(12,2)) as QJCLXJ,cast(sum(ISNULL(AYTJ_GDZZFY,0)) as decimal(12,2)) as QJGDZZFY,cast(sum(ISNULL(AYTJ_KBZZFY,0)) as decimal(12,2)) as QJKBZZFY,cast((sum(ISNULL(AYTJ_GDZZFY,0))+sum(ISNULL(AYTJ_KBZZFY,0))) as decimal(12,2)) as QJZZFYXJ,cast(sum(ISNULL((isnull(AYTJ_WXFY,0)+isnull(DIF_DIFMONEY,0)),0)) as decimal(12,2)) as QJWXFY,cast(sum(ISNULL(AYTJ_CNFB,0)) as decimal(12,2)) as QJCNFB,cast(sum(ISNULL((isnull(AYTJ_YF,0)+isnull(DIFYF_DIFMONEY,0)),0)) as decimal(12,2)) as QJYF,cast(sum(ISNULL(AYTJ_FJCB,0)) as decimal(12,2)) as QJFJCB,cast(sum(ISNULL(AYTJ_QT,0)) as decimal(12,2)) as QJQT from (select * from VIEW_FM_AYTJ as a left join (select sum(cast(DIF_DIFMONEY as decimal(12,2))) as DIF_DIFMONEY,DIF_TSAID,DIF_YEAR,DIF_MONTH from TBFM_DIF group by DIF_TSAID,DIF_YEAR,DIF_MONTH)b on (a.PMS_TSAID=b.DIF_TSAID and a.AYTJ_YEARMONTH=b.DIF_YEAR+'-'+b.DIF_MONTH) left join (select sum(cast(DIFYF_DIFMONEY as decimal(12,2))) as DIFYF_DIFMONEY,DIFYF_TSAID,DIFYF_YEAR,DIFYF_MONTH from TBFM_YFDIF group by DIFYF_TSAID,DIFYF_YEAR,DIFYF_MONTH)c on (a.PMS_TSAID=c.DIFYF_TSAID and a.AYTJ_YEARMONTH=c.DIFYF_YEAR+'-'+c.DIFYF_MONTH))t where (PMS_YEAR+'-'+PMS_MONTH)>='" + startyearmonth + "' and (PMS_YEAR+'-'+PMS_MONTH)<='" + endyearmonth + "' and PMS_TSAID in(" + rwhdc + ") group by PMS_TSAID";//sum(ISNULL(AYTJ_GZ,0)) as QJGZ,
                System.Data.DataTable dt = DBCallCommon.GetDTUsingSqlText(sqltext);
                ExportDataItem(dt);
            }
            else if (flag == 1)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('请选择要导出的数据!!!');", true);
            }
        }
コード例 #6
0
        protected void btnConfirm_Click(object sender, EventArgs e)
        {
            string jgnum = txt_jgnum.Text.Trim().ToString();
            string code  = "";

            foreach (RepeaterItem Reitem in checked_list_Repeater.Items)
            {
                System.Web.UI.WebControls.CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as System.Web.UI.WebControls.CheckBox;
                if (cbx.Checked)
                {
                    System.Web.UI.WebControls.Label lb_picno = Reitem.FindControl("lbdh") as System.Web.UI.WebControls.Label;
                    code = lb_picno.Text.ToString();
                    string sqltxt = "";
                    if (jgnum != "")
                    {
                        sqltxt = " update TBMP_IQRCMPPRICE set PIC_JGNUM='" + jgnum + "' WHERE PIC_SHEETNO='" + code + "'";
                        DBCallCommon.ExeSqlText(sqltxt);
                        break;
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('您没有填写数据');", true);
                        return;
                    }
                }
            }

            getArticle(true);
        }
コード例 #7
0
        protected void btn_plan_click(object sender, EventArgs e)
        {
            string sqltext      = "";
            string PM_XIALIAO   = "";
            string PM_JIJIA     = "";
            string PM_JIEGOU    = "";
            string PM_ZHUANGPEI = "";
            string PM_PENGQI    = "";
            string PM_RUKU      = "";
            string PM_NOTE      = "";
            string MS_ID        = "";

            foreach (RepeaterItem Reitem in pm_projectplan_view_repeater.Items)
            {
                PM_XIALIAO   = ((TextBox)Reitem.FindControl("xialiaotime")).Text.ToString();
                PM_JIJIA     = ((TextBox)Reitem.FindControl("jijiatime")).Text.ToString();
                PM_JIEGOU    = ((TextBox)Reitem.FindControl("jiegoutime")).Text.ToString();
                PM_ZHUANGPEI = ((TextBox)Reitem.FindControl("zhuangpeitime")).Text.ToString();
                PM_PENGQI    = ((TextBox)Reitem.FindControl("pengqitime")).Text.ToString();
                PM_RUKU      = ((TextBox)Reitem.FindControl("rukutime")).Text.ToString();
                PM_NOTE      = ((TextBox)Reitem.FindControl("txt_beizhu")).Text.Trim().ToString();
                MS_ID        = ((Label)Reitem.FindControl("MS_ID")).Text.Trim().ToString();
                sqltext      = "update  TBPM_PROJ_PLAN set PM_XIALIAO='" + PM_XIALIAO + "',PM_JIJIA='" + PM_JIJIA + "',PM_JIEGOU='" + PM_JIEGOU + "',PM_ZHUANGPEI='" + PM_ZHUANGPEI + "',PM_PENGQI='" + PM_PENGQI + "',PM_RUKU='" + PM_RUKU + "',PM_NOTE='" + PM_NOTE + "' where MS_ID='" + MS_ID + "'";
                DBCallCommon.ExeSqlText(sqltext);
            }
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('项目计划保存成功!');window.location.href='PM_ProjectPlan.aspx'", true);
        }
コード例 #8
0
        protected void finish_Click(object sender, EventArgs e)
        {
            string        sqltext     = "";
            string        state       = "";
            string        ptcode      = "";
            string        cgid        = "";
            string        cgnm        = "";
            int           i           = 0;
            List <string> sqltextlist = new List <string>();

            foreach (RepeaterItem Reitem in tbpc_purshaseplanrealityRepeater.Items)
            {
                state  = ((Label)Reitem.FindControl("PUR_STATE")).Text;
                ptcode = ((TextBox)Reitem.FindControl("PUR_PTCODE")).Text;
                cgid   = ((Label)Reitem.FindControl("PUR_CGMANCODE")).Text;
                cgnm   = ((Label)Reitem.FindControl("PUR_CGMANNAME")).Text;
                if (state == "3" && cgnm != "")
                {
                    i++;
                    sqltext = "UPDATE TBPC_PURCHASEPLAN SET PUR_CGMAN='" + cgid + "',PUR_STATE='4',PUR_PTASMAN='" +
                              Session["UserID"].ToString() + "',PUR_PTASTIME='" +
                              DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',Pue_Closetype=NULL  WHERE PUR_PTCODE='" + ptcode + "' and PUR_CSTATE='0'";
                    sqltextlist.Add(sqltext);
                }
            }
            if (i > 0)
            {
                DBCallCommon.ExecuteTrans(sqltextlist);
                Response.Redirect("~/PC_Data/PC_TBPC_Purchaseplan_assign_list.aspx");
            }
            else
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('请选择采购员!');", true);
            }
        }
コード例 #9
0
 //全选
 protected void selectall_CheckedChanged(object sender, EventArgs e)
 {
     if (selectall.Checked)
     {
         foreach (RepeaterItem Reitem in tbpc_purshaseplanassignRepeater.Items)
         {
             CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as CheckBox; //定义checkbox
             if (cbx != null)                                               //存在行
             {
                 cbx.Checked = true;
             }
         }
     }
     else
     {
         foreach (RepeaterItem Reitem in tbpc_purshaseplanassignRepeater.Items)
         {
             CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as CheckBox; //定义checkbox
             if (cbx != null)                                               //存在行
             {
                 cbx.Checked = false;
             }
         }
     }
 }
コード例 #10
0
        protected void btn_daochu_Click(object sender, EventArgs e)
        {
            int           temp = isselected();
            List <string> list = new List <string>();

            if (temp == 1)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('您没有选择数据,本次操作无效!');", true);
            }
            else if (temp == 2)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('您选择的数据包含多条订单,本次操作无效!');", true);
            }
            else
            {
                string sqltext = "";
                string docnum  = "";
                foreach (RepeaterItem Reitem in Purordertotal_list_Repeater.Items)
                {
                    System.Web.UI.WebControls.CheckBox cb = (System.Web.UI.WebControls.CheckBox)Reitem.FindControl("CKBOX_SELECT");
                    if (cb.Checked)
                    {
                        docnum  = ((System.Web.UI.WebControls.Label)Reitem.FindControl("TO_DOCNUM")).Text;
                        sqltext = "select TO_DOCNUM,  TO_ZDRNAME, TO_ZDTIME,TO_SUPPLYNAME,TO_AMOUNT,TO_TOTALNOTE, CAST(TO_BJDOCNUM AS BIGINT) as TO_BJDOCNUM,PIC_JGNUM, TO_PTC, PIC_TUHAO,PIC_MNAME,PIC_ZXNUM,PIC_WXTYPE,TO_PROCESS,PIC_PRICE,TO_MONEY,PIC_SUPPLYTIME,TO_SJJHQ,TO_NOTE,isnull(PIC_BJSTATUS,'未报检') from VIEW_TBMP_Order where TO_DOCNUM='" + docnum + "'";
                    }
                }
                ExportDataItem1(sqltext, docnum);
            }
        }
コード例 #11
0
        //导出
        protected void btn_daochu_Click(object sender, EventArgs e)
        {
            int temp = ifselect();

            if (temp == 0)
            {
                string ordercode = "";
                string code      = "";
                foreach (RepeaterItem Reitem in tbpc_pchsplanrvwchecklistRepeater.Items)
                {
                    System.Web.UI.WebControls.CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as System.Web.UI.WebControls.CheckBox;//定义checkbox
                    if (cbx.Checked)
                    {
                        if (ordercode == "" || code != ((System.Web.UI.WebControls.Label)Reitem.FindControl("PR_PCODE")).Text.ToString())
                        {
                            ordercode += ((System.Web.UI.WebControls.Label)Reitem.FindControl("PR_PCODE")).Text.ToString() + "|";
                        }
                        code = ((System.Web.UI.WebControls.Label)Reitem.FindControl("PR_PCODE")).Text.ToString();
                    }
                }
                ordercode = ordercode.Replace("|", "','");
                ordercode = ordercode.Substring(0, ordercode.LastIndexOf(",")).ToString();
                ordercode = "'" + ordercode;
                string sqltext = "";
                sqltext = "SELECT PR_PCODE,PR_REVIEWA,PR_REVIEWANM,PJ_NAME,TSA_ENGNAME,PR_REVIEWATIME,PR_REVIEWB,PR_REVIEWBNM," +
                          "PR_REVIEWBTIME,PR_STATE,PR_NOTE,ptcode,marid,marnm,margg,marcz,margb,usenum,marunit,allnote  " +
                          "from View_TBPC_MARSTOUSE_TOTAL_ALL  where PR_PCODE in (" + ordercode + ")";
                System.Data.DataTable dt = DBCallCommon.GetDTUsingSqlText(sqltext);
                ExportDataItem(dt);
            }
            else if (temp == 1)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('请选择要导出的占用单!!!');", true);
            }
        }
コード例 #12
0
        protected void btn_export_Click(object sender, EventArgs e)
        {
            int flag = ifselect();

            if (flag == 0)//判断是否有勾选框被勾选
            {
                string rwhdc = "";
                foreach (RepeaterItem Reitem in rptProNumCost.Items)
                {
                    System.Web.UI.WebControls.CheckBox cbx = Reitem.FindControl("cbxSelect") as System.Web.UI.WebControls.CheckBox;//定义checkbox
                    if (cbx.Checked)
                    {
                        rwhdc += "'" + ((System.Web.UI.WebControls.Label)Reitem.FindControl("lbrwh")).Text.ToString() + "'" + ",";
                    }
                }
                rwhdc = rwhdc.Substring(0, rwhdc.LastIndexOf(",")).ToString();
                string sqltext = "";
                sqltext = "select PMS_TSAID,TSA_PJID,CM_PROJ,cast((isnull(AYTJ_JJFYXJ,0)+isnull(AYTJ_JGYZFYXJ,0)) as decimal(12,2)) as RWHCB_ZJRG,isnull(XJPMS_01_11,0) as RWHCB_WGJ,isnull(XJPMS_01_07,0) as RWHCB_HSJS,isnull(XJPMS_01_05,0) as RWHCB_HCL,isnull(XJPMS_01_08,0) as RWHCB_ZJ,isnull(XJPMS_01_09,0) as RWHCB_DJ,isnull(XJPMS_01_10,0) as RWHCB_ZC,isnull(XJPMS_01_01,0) as RWHCB_BZJ,isnull(XJPMS_01_15,0) as RWHCB_YQTL,(isnull(XJPMS_01_02,0)+isnull(XJPMS_01_03,0)+isnull(XJPMS_01_04,0)+isnull(XJPMS_01_06,0)+isnull(XJPMS_01_12,0)+isnull(XJPMS_01_13,0)+isnull(XJPMS_01_14,0)+isnull(XJPMS_01_16,0)+isnull(XJPMS_01_17,0)+isnull(XJPMS_01_18,0)+isnull(XJPMS_02_01,0)+isnull(XJPMS_02_02,0)+isnull(XJPMS_02_03,0)+isnull(XJPMS_02_04,0)+isnull(XJPMS_02_05,0)+isnull(XJPMS_02_06,0)+isnull(XJPMS_02_07,0)+isnull(XJPMS_02_08,0)+isnull(XJPMS_02_09,0)) as RWHCB_QTCL,(isnull(XJPMS_01_01,0)+isnull(XJPMS_01_02,0)+isnull(XJPMS_01_03,0)+isnull(XJPMS_01_04,0)+isnull(XJPMS_01_05,0)+isnull(XJPMS_01_06,0)+isnull(XJPMS_01_07,0)+isnull(XJPMS_01_08,0)+isnull(XJPMS_01_09,0)+isnull(XJPMS_01_10,0)+isnull(XJPMS_01_11,0)+isnull(XJPMS_01_12,0)+isnull(XJPMS_01_13,0)+isnull(XJPMS_01_14,0)+isnull(XJPMS_01_15,0)+isnull(XJPMS_01_16,0)+isnull(XJPMS_01_17,0)+isnull(XJPMS_01_18,0)+isnull(XJPMS_02_01,0)+isnull(XJPMS_02_02,0)+isnull(XJPMS_02_03,0)+isnull(XJPMS_02_04,0)+isnull(XJPMS_02_05,0)+isnull(XJPMS_02_06,0)+isnull(XJPMS_02_07,0)+isnull(XJPMS_02_08,0)+isnull(XJPMS_02_09,0)) as RWHCB_CL,cast((AYTJ_GDZZFYXJ+AYTJ_KBZZFYXJ) as decimal(12,2)) as RWHCB_ZZFY,cast(AYTJ_WXFYXJ as decimal(12,2)) as RWHCB_WXFY,cast(AYTJ_CNFBXJ as decimal(12,2)) as RWHCB_CNFB,cast(AYTJ_YFXJ as decimal(12,2)) as RWHCB_YF,cast(AYTJ_FJCBXJ as decimal(12,2)) as RWHCB_FJCB,cast((isnull(AYTJ_JJFYXJ,0)+isnull(AYTJ_JGYZFYXJ,0)+isnull(XJPMS_01_01,0)+isnull(XJPMS_01_02,0)+isnull(XJPMS_01_03,0)+isnull(XJPMS_01_04,0)+isnull(XJPMS_01_05,0)+isnull(XJPMS_01_06,0)+isnull(XJPMS_01_07,0)+isnull(XJPMS_01_08,0)+isnull(XJPMS_01_09,0)+isnull(XJPMS_01_10,0)+isnull(XJPMS_01_11,0)+isnull(XJPMS_01_12,0)+isnull(XJPMS_01_13,0)+isnull(XJPMS_01_14,0)+isnull(XJPMS_01_15,0)+isnull(XJPMS_01_16,0)+isnull(XJPMS_01_17,0)+isnull(XJPMS_01_18,0)+isnull(XJPMS_02_01,0)+isnull(XJPMS_02_02,0)+isnull(XJPMS_02_03,0)+isnull(XJPMS_02_04,0)+isnull(XJPMS_02_05,0)+isnull(XJPMS_02_06,0)+isnull(XJPMS_02_07,0)+isnull(XJPMS_02_08,0)+isnull(XJPMS_02_09,0)+isnull(AYTJ_GDZZFYXJ,0)+isnull(AYTJ_KBZZFYXJ,0)+isnull(AYTJ_WXFYXJ,0)+isnull(AYTJ_CNFBXJ,0)+isnull(AYTJ_YFXJ,0)+isnull(AYTJ_FJCBXJ,0)) as decimal(12,2)) as RWHCB_CBZJ,kp_money_total,case when CWCB_STATE='1' then '是' else '否' end as CWCB_STATE,CWCB_HSDATE from (select * from (select PMS_TSAID,TSA_PJID,CM_PROJ,cast(sum(isnull(PMS_01_01,0)) as decimal(12,2)) as XJPMS_01_01,cast(sum(isnull(PMS_01_02,0)) as decimal(12,2)) as XJPMS_01_02,cast(sum(isnull(PMS_01_03,0)) as decimal(12,2)) as XJPMS_01_03,cast(sum(isnull(PMS_01_04,0)) as decimal(12,2)) as XJPMS_01_04,cast(sum(isnull(PMS_01_05,0)) as decimal(12,2)) as XJPMS_01_05,cast(sum(isnull(PMS_01_06,0)) as decimal(12,2)) as XJPMS_01_06,cast(sum(isnull(PMS_01_07,0)) as decimal(12,2)) as XJPMS_01_07,cast(sum(isnull(PMS_01_08,0)) as decimal(12,2)) as XJPMS_01_08,cast(sum(isnull(PMS_01_09,0)) as decimal(12,2)) as XJPMS_01_09,cast(sum(isnull(PMS_01_10,0)) as decimal(12,2)) as XJPMS_01_10,cast(sum(isnull(PMS_01_11,0)) as decimal(12,2)) as XJPMS_01_11,cast(sum(isnull(PMS_01_12,0)) as decimal(12,2)) as XJPMS_01_12,cast(sum(isnull(PMS_01_13,0)) as decimal(12,2)) as XJPMS_01_13,cast(sum(isnull(PMS_01_14,0)) as decimal(12,2)) as XJPMS_01_14,cast(sum(isnull(PMS_01_15,0)) as decimal(12,2)) as XJPMS_01_15,cast(sum(isnull(PMS_01_16,0)) as decimal(12,2)) as XJPMS_01_16,cast(sum(isnull(PMS_01_17,0)) as decimal(12,2)) as XJPMS_01_17,cast(sum(isnull(PMS_01_18,0)) as decimal(12,2)) as XJPMS_01_18,cast(sum(isnull(PMS_02_01,0)) as decimal(12,2)) as XJPMS_02_01,cast(sum(isnull(PMS_02_02,0)) as decimal(12,2)) as XJPMS_02_02,cast(sum(isnull(PMS_02_03,0)) as decimal(12,2)) as XJPMS_02_03,cast(sum(isnull(PMS_02_04,0)) as decimal(12,2)) as XJPMS_02_04,cast(sum(isnull(PMS_02_05,0)) as decimal(12,2)) as XJPMS_02_05,cast(sum(isnull(PMS_02_06,0)) as decimal(12,2)) as XJPMS_02_06,cast(sum(isnull(PMS_02_07,0)) as decimal(12,2)) as XJPMS_02_07,cast(sum(isnull(PMS_02_08,0)) as decimal(12,2)) as XJPMS_02_08,cast(sum(isnull(PMS_02_09,0)) as decimal(12,2)) as XJPMS_02_09,isnull(sum(isnull(AYTJ_GZ,0)),0) as AYTJ_GZXJ,isnull(sum(isnull(AYTJ_QT,0)),0) as AYTJ_QTXJ,sum(isnull(AYTJ_JJFY,0)) as AYTJ_JJFYXJ,sum(isnull(AYTJ_JGYZFY,0)) as AYTJ_JGYZFYXJ,sum(isnull(AYTJ_GDZZFY,0)) as AYTJ_GDZZFYXJ,sum(isnull(AYTJ_KBZZFY,0)) as AYTJ_KBZZFYXJ,sum(isnull(AYTJ_WXFY,0)+isnull(DIF_DIFMONEY,0)) as AYTJ_WXFYXJ,sum(isnull(AYTJ_CNFB,0)) as AYTJ_CNFBXJ,sum(isnull(AYTJ_YF,0)+isnull(DIFYF_DIFMONEY,0)) as AYTJ_YFXJ,sum(isnull(AYTJ_FJCB,0)) as AYTJ_FJCBXJ from (select * from VIEW_FM_AYTJ as a left join (select sum(cast(DIF_DIFMONEY as decimal(12,2))) as DIF_DIFMONEY,DIF_TSAID,DIF_YEAR,DIF_MONTH from TBFM_DIF group by DIF_TSAID,DIF_YEAR,DIF_MONTH)b on (a.PMS_TSAID=b.DIF_TSAID and a.AYTJ_YEARMONTH=b.DIF_YEAR+'-'+b.DIF_MONTH) left join (select sum(cast(DIFYF_DIFMONEY as decimal(12,2))) as DIFYF_DIFMONEY,DIFYF_TSAID,DIFYF_YEAR,DIFYF_MONTH from TBFM_YFDIF group by DIFYF_TSAID,DIFYF_YEAR,DIFYF_MONTH)c on (a.PMS_TSAID=c.DIFYF_TSAID and a.AYTJ_YEARMONTH=c.DIFYF_YEAR+'-'+c.DIFYF_MONTH))s group by PMS_TSAID,TSA_PJID,CM_PROJ) as a left join (select TASK_ID,CWCB_STATE,CWCB_HSDATE from TBCB_BMCONFIRM) as b on a.PMS_TSAID=b.TASK_ID)t left join (select TaskId,sum(kpmoney) as kp_money_total from (select CM_KAIPIAO_DETAIL.TaskId as TaskId,cast(CM_KAIPIAO_DETAIL.kpmoney as float) as kpmoney  from  CM_KAIPIAO left join CM_KAIPIAO_DETAIL on CM_KAIPIAO.KP_TaskID=CM_KAIPIAO_DETAIL.cId where CM_KAIPIAO.KP_KPNUMBER is not null)h  group by TaskId)g on t.PMS_TSAID=g.taskid where PMS_TSAID in (" + rwhdc + ")";
                System.Data.DataTable dt = DBCallCommon.GetDTUsingSqlText(sqltext);
                ExportDataItem(dt);
            }
            else if (flag == 1)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('请选择要导出的数据!!!');", true);
            }
        }
コード例 #13
0
        protected void btnexport_OnClick(object sender, EventArgs e)
        {
            int flag = ifselect();

            if (flag == 0)//判断是否有勾选框被勾选
            {
                string JS_JHGZHdc = "";
                foreach (RepeaterItem Reitem in rptJSDGL.Items)
                {
                    System.Web.UI.WebControls.CheckBox cbx = Reitem.FindControl("chk") as System.Web.UI.WebControls.CheckBox;//定义checkbox
                    if (cbx.Checked)
                    {
                        JS_JHGZHdc += "'" + ((System.Web.UI.WebControls.Label)Reitem.FindControl("JS_JHGZH")).Text.ToString() + "'" + ",";
                    }
                }
                JS_JHGZHdc = JS_JHGZHdc.Substring(0, JS_JHGZHdc.LastIndexOf(",")).ToString();
                string sqltextdc = "";
                sqltextdc = "select JS_BH,JS_ZDR,JS_RQ,JS_JHGZH,JS_HTH,JS_RWH,JS_ZX,JS_GYS,JS_JHQ,JS_SHDW,JS_BJSL,JS_DANZ,JS_SHUIL,JS_HSJE from PM_CPFYJSD where JS_JHGZH in(" + JS_JHGZHdc + ") order by JS_ID desc";
                System.Data.DataTable dtdc = DBCallCommon.GetDTUsingSqlText(sqltextdc);
                ExportDataItem(dtdc);
            }
            else if (flag == 1)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('请选择要导出的数据!!!');", true);
            }
        }
コード例 #14
0
        protected void btnConfirm_Click(object sender, EventArgs e)
        {
            List <string> list_str = new List <string>();
            int           i        = 0;

            foreach (RepeaterItem Reitem in details_repeater.Items)
            {
                System.Web.UI.WebControls.CheckBox cb = (System.Web.UI.WebControls.CheckBox)Reitem.FindControl("CKBOX_SELECT");
                if (cb.Checked)
                {
                    i++;
                    string msid = ((System.Web.UI.WebControls.Label)Reitem.FindControl("MS_ID")).Text.ToString();
                    if (ddl_fengfong.SelectedIndex != 0)
                    {
                        sqltext = "update " + tablename + " set MS_PERSON='" + ddl_fengfong.SelectedValue.ToString() + "' WHERE MS_ID='" + msid + "'";
                        list_str.Add(sqltext);
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('您没有选择相应的分工人员!');", true);
                        break;
                    }
                }
            }
            if (i == 0)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('您没有选择数据!');", true);
            }
            else if (i >= 1)
            {
                DBCallCommon.ExecuteTrans(list_str);
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('保存成功!')", true);
            }
            ControlVisible();
        }
コード例 #15
0
        ////////////////////////////////////////////////////////////////////////////


        //下推发票
        protected void btnXTFP_Click(object sender, EventArgs e)
        {
            int count = 0;

            foreach (RepeaterItem Reitem in rptProNumCost.Items)
            {
                System.Web.UI.WebControls.CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as System.Web.UI.WebControls.CheckBox;
                if (cbx.Checked)
                {
                    count++;
                    string jhgzh = ((System.Web.UI.WebControls.Label)Reitem.FindControl("lbjhgzh")).Text.Trim().ToString();
                    //passjhgzh += jhgzh + "/";
                    string sql = "update TBMP_ACCOUNTS set TA_XTSTATE='1' where TA_PTC='" + jhgzh + "'";
                    DBCallCommon.ExeSqlText(sql);
                }
            }
            if (count > 0)
            {
                //passjhgzh = passjhgzh.Substring(0, passjhgzh.Length - 1);
                //Response.Redirect("FM_Create_wxInvoice.aspx?arrayJhgzh=" + passjhgzh);
                Response.Redirect("FM_Create_wxInvoice.aspx?");
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "myscript", "<script type='text/javascript'>alert('请选择要下推到发票的项!')</script>");
                return;
            }
        }
コード例 #16
0
        ////////////////////////////////////////////////////////////////////////////


        //下推发票
        protected void btnXTFP_Click(object sender, EventArgs e)
        {
            int count = 0;

            foreach (RepeaterItem Reitem in rptProNumCost.Items)
            {
                System.Web.UI.WebControls.CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as System.Web.UI.WebControls.CheckBox;
                if (cbx.Checked)
                {
                    count++;
                    string jhgzh = ((System.Web.UI.WebControls.Label)Reitem.FindControl("lbjhgzh")).Text.Trim().ToString();
                    string sql   = "update PM_CPFYJSD set JS_XTSTATE='1' where JS_JHGZH='" + jhgzh + "'";
                    DBCallCommon.ExeSqlText(sql);
                }
            }
            if (count > 0)
            {
                Response.Redirect("FM_Create_YFInvoice.aspx?");
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "myscript", "<script type='text/javascript'>alert('请选择要下推到发票的项!')</script>");
                return;
            }
        }
コード例 #17
0
 protected void selectall_CheckedChanged(object sender, EventArgs e)
 {
     if (selectall.Checked)
     {
         foreach (RepeaterItem Reitem in Purordertotal_list_Repeater.Items)
         {
             System.Web.UI.WebControls.CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as System.Web.UI.WebControls.CheckBox; //定义checkbox
             if (cbx != null)                                                                                                   //存在行
             {
                 cbx.Checked = true;
             }
         }
     }
     else
     {
         foreach (RepeaterItem Reitem in Purordertotal_list_Repeater.Items)
         {
             System.Web.UI.WebControls.CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as System.Web.UI.WebControls.CheckBox; //定义checkbox
             if (cbx != null)                                                                                                   //存在行
             {
                 cbx.Checked = false;
             }
         }
     }
 }
コード例 #18
0
        protected void btn_delete_Click(object sender, EventArgs e)
        {
            int           temp = isselected();
            List <string> list = new List <string>();

            if (temp == 1)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('您没有选择数据,本次操作无效!');", true);
            }
            else if (temp == 2)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('您选择的数据包含已生成结算单的数据,本次操作无效!');", true);
            }
            else
            {
                foreach (RepeaterItem Reitem in PurorderdetailRepeater.Items)
                {
                    CheckBox cb = (CheckBox)Reitem.FindControl("CKBOX_SELECT");
                    if (cb != null)
                    {
                        if (cb.Checked)
                        {
                            string ptc = ((System.Web.UI.WebControls.Label)Reitem.FindControl("TO_PTC")).Text;
                            string sql = "delete from TBMP_Order where TO_PTC='" + ptc + "' and TO_DOCNUM='" + LabelCode.Text.ToString() + "'";
                            list.Add(sql);
                            sql = "update  TBMP_IQRCMPPRICE set PIC_ORDERSTATE='0'where PTC='" + ptc + "'";
                            list.Add(sql);
                        }
                    }
                }
                DBCallCommon.ExecuteTrans(list);
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('删除成功!');window.location.reload();", true);
            }
        }
コード例 #19
0
        private bool is_samesupply()//判断是否同一供应商
        {
            string temppcode = "";
            bool   temp      = true;
            int    i         = 0;

            foreach (RepeaterItem Reitem in tbpc_purshaseplanassignRepeater.Items)
            {
                CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as CheckBox; //定义checkbox
                if (cbx != null)                                               //存在行
                {
                    if (cbx.Checked)
                    {
                        i++;
                        if (i == 1)
                        {
                            temppcode = ((Label)Reitem.FindControl("PUR_SUPPLY")).Text.ToString();
                        }
                        else
                        {
                            if (temppcode != ((Label)Reitem.FindControl("PUR_SUPPLY")).Text.ToString())
                            {
                                temp = false;
                                break;
                            }
                        }
                    }
                }
            }
            return(temp);
        }
コード例 #20
0
        private int numtrue()
        {
            int temp = 0;

            foreach (RepeaterItem Reitem in purchaseplan_Repeater.Items)
            {
                double num     = Convert.ToDouble(((Label)Reitem.FindControl("PUR_NUM")).Text.ToString());
                double fznum   = Convert.ToDouble(((Label)Reitem.FindControl("PUR_FZNUM")).Text.ToString());
                double rpnum   = Convert.ToDouble(((TextBox)Reitem.FindControl("PUR_RPNUM")).Text.ToString() == "" ? "0" : ((TextBox)Reitem.FindControl("PUR_RPNUM")).Text.ToString());
                double rpfznum = Convert.ToDouble(((TextBox)Reitem.FindControl("PUR_RPFZNUM")).Text.ToString() == "" ? "0" : ((TextBox)Reitem.FindControl("PUR_RPFZNUM")).Text.ToString());
                if (rpnum > num || rpfznum > fznum)//超出需用计划量
                {
                    temp = 1;
                }
                else if (rpnum == num && rpfznum == fznum)//等于需用计划量,不用拆分
                {
                    temp = 2;
                }
                else if (rpnum == 0)
                {
                    temp = 3;
                }
                else
                {
                    temp = 0;
                }
            }
            return(temp);
        }
コード例 #21
0
        protected void btn_hclose_Click(object sender, EventArgs e)
        {
            string sqltext = "";
            string ptcode  = "";

            foreach (RepeaterItem Reitem in PurorderdetailRepeater.Items)
            {
                CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as CheckBox;//定义checkbox
                if (cbx.Checked)
                {
                    if (((Label)Reitem.FindControl("PO_CSTATE")).Text.ToString() == "0")//未关闭时才可关闭
                    {
                        ptcode  = ((Label)Reitem.FindControl("PO_PCODE")).Text;
                        sqltext = "update TBPC_PURORDERDETAIL set PO_CSTATE='1' where PO_PCODE='" + ptcode + "'";//行关闭
                        DBCallCommon.ExeSqlText(sqltext);
                        //sqltext = "update TBPC_IQRCMPPRICE set PIC_QUANTITY=PIC_QUANTITY-'" + float.Parse(((Label)Reitem.FindControl("PO_QUANTITY")).Text) + "' where PIC_PCODE='" + ptcode + "'";
                        //sqltext = "update TBPC_IQRCMPPRICE set PIC_STATE='4' where PIC_PCODE='" + ptcode + "'";
                        //DBCallCommon.ExeSqlText(sqltext);
                        //sqltext = "update TBPC_PURCHASEPLAN set PUR_STATE='4' where PUR_PTCODE='" + ptcode + "'";
                        //DBCallCommon.ExeSqlText(sqltext);
                        sqltext = "update TBPC_MPCHANGEDETAIL set MP_STATE='1' where MP_STATE='" + ptcode + "'";//变更执行
                        DBCallCommon.ExeSqlText(sqltext);
                    }
                }
            }
            PurorderdetailRepeaterbind();
        }
コード例 #22
0
        protected void PO_CGTIMERQ_Textchanged(object sender, EventArgs e)
        {
            string time  = "";
            string time1 = "";
            int    k     = 0;
            int    j     = 0;

            foreach (RepeaterItem Reitem in PurorderdetailRepeater.Items)
            {
                k++;
                TextBox tbx = (TextBox)Reitem.FindControl("PO_CGTIMERQ");
                time1 = ((Label)Reitem.FindControl("Label1")).Text;
                time  = tbx.Text;
                if (time != "" && time1 != time)
                {
                    break;
                }
            }
            foreach (RepeaterItem Reitem in PurorderdetailRepeater.Items)
            {
                j++;
                if (j >= k)
                {
                    ((TextBox)Reitem.FindControl("PO_CGTIMERQ")).Text = time;
                    ((Label)Reitem.FindControl("Label1")).Text        = time;
                }
            }
        }
コード例 #23
0
        protected int checkednum()
        {
            int temp = 0;
            int j    = 0;

            foreach (RepeaterItem Reitem in purchaseplan_Repeater.Items)
            {
                CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as CheckBox;//定义checkbox
                if (cbx.Checked)
                {
                    j++;
                }
            }
            if (j == 1)
            {
                temp = 1;//选择一个订单
            }
            else if (j > 1)
            {
                temp = 2;//选择了超过一个订单
            }
            else
            {
                temp = 0;//没选择订单
            }
            return(temp);
        }
コード例 #24
0
        protected void btn_add_Click(object sender, EventArgs e)//追加订单
        {
            int    j            = 0;
            int    temp         = isselected1();
            string ptcode_rcode = "";
            string ptcode       = "";

            if (temp == 1)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('您没有选择数据,本次操作无效!');", true);
                return;
            }
            else if (temp == 3)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('选择的数据包含有不同的供应商的记录,本次操作无效!');", true);
                return;
            }
            else if (temp == 4)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('选择的数据包含已生成结算单的记录,本次操作无效!');", true);
                return;
            }
            else
            {
                foreach (RepeaterItem Reitem in Purordertotal_list_Repeater.Items)
                {
                    if (((System.Web.UI.WebControls.CheckBox)Reitem.FindControl("CKBOX_SELECT")).Checked)
                    {
                        ptcode = ptcode + ((System.Web.UI.WebControls.Label)Reitem.FindControl("TO_ID")).Text + ",";
                    }
                }
                ptcode_rcode = ptcode + Session["UserID"].ToString();
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "mowinopen('" + ptcode_rcode + "');", true);
            }
        }
コード例 #25
0
        protected void Button_save_Click(object sender, EventArgs e)
        {
            string        sqltext = "";
            string        state   = "";
            SqlCommand    sqlCmd  = new SqlCommand();
            SqlConnection sqlConn = new SqlConnection();

            sqlConn.ConnectionString = DBCallCommon.GetStringValue("connectionStrings");
            sqlConn.Open();
            sqlCmd.Connection = sqlConn;
            foreach (RepeaterItem Reitem in tbpc_purshaseplanrealityRepeater.Items)
            {
                state = ((Label)Reitem.FindControl("PUR_STATE")).Text;
                if (state == "3")
                {
                    sqltext = "update TBPC_PURCHASEPLAN set PUR_CGMAN=@PUR_CGMANCODE  " +
                              "where PUR_PTCODE=@PUR_PTCODE and PUR_CSTATE='0'";
                    sqlCmd.CommandText = sqltext;
                    sqlCmd.Parameters.Clear();
                    sqlCmd.Parameters.AddWithValue("@PUR_PTCODE", ((TextBox)Reitem.FindControl("PUR_PTCODE")).Text);
                    sqlCmd.Parameters.AddWithValue("@PUR_CGMANCODE", ((Label)Reitem.FindControl("PUR_CGMANCODE")).Text);
                    int rowsnum = sqlCmd.ExecuteNonQuery();
                }
            }
            DBCallCommon.closeConn(sqlConn);
            repeaterdatabind();
            ddl_caigouyuan.SelectedIndex = 0;
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('保存成功!');", true);
        }
コード例 #26
0
ファイル: FM_CWFX.aspx.cs プロジェクト: 2644783865/TJ_UPGRADE
        protected void btnexport_Click(object sender, EventArgs e)
        {
            int flag = ifselect();

            if (flag == 0)//判断是否有勾选框被勾选
            {
                string rqbhdc = "";
                foreach (RepeaterItem Reitem in rptProNumCost.Items)
                {
                    System.Web.UI.WebControls.CheckBox cbx = Reitem.FindControl("chkDel") as System.Web.UI.WebControls.CheckBox;//定义checkbox
                    if (cbx.Checked)
                    {
                        rqbhdc += "'" + ((System.Web.UI.WebControls.Label)Reitem.FindControl("RQBH")).Text.ToString() + "'" + ",";
                    }
                }
                rqbhdc = rqbhdc.Substring(0, rqbhdc.LastIndexOf(",")).ToString();
                string sqltext = "";
                sqltext = "select * from TBFM_CWFX where  RQBH in (" + rqbhdc + ") order by RQBH";
                System.Data.DataTable dt = DBCallCommon.GetDTUsingSqlText(sqltext);
                ExportDataItem(dt);
            }
            else if (flag == 1)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('请选择要导出的财务分析数据!!!');", true);
            }
        }
コード例 #27
0
ファイル: FM_ZCFZ.aspx.cs プロジェクト: 2644783865/TJ_UPGRADE
        //查询
        #region 导出功能

        protected void btnexport_Click(object sender, EventArgs e) //导出
        {
            int    i   = 0;
            string pid = "";

            foreach (RepeaterItem Reitem in rptProNumCost.Items)
            {
                System.Web.UI.WebControls.CheckBox cbx = Reitem.FindControl("chkDel") as System.Web.UI.WebControls.CheckBox; //定义checkbox
                if (cbx != null)                                                                                             //存在行
                {
                    if (cbx.Checked)
                    {
                        i++;
                        pid = ((System.Web.UI.WebControls.Label)Reitem.FindControl("RQBH")).Text;
                    }
                }
            }
            if (i == 1)
            {
                string sqltext = "select * from TBFM_ZCFZ where RQBH='" + pid + "' and ";

                ExportDataItem(sqltext, pid);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('请正确选择需要导出的资产负债信息!');", true);
            }
        }
コード例 #28
0
        protected void btn_add_Click(object sender, EventArgs e)//追加订单
        {
            int    j   = 0;
            double num = 0;

            foreach (RepeaterItem Reitem in tbpc_purshaseplanassignRepeater.Items)
            {
                if (((System.Web.UI.WebControls.CheckBox)Reitem.FindControl("CKBOX_SELECT")).Checked)
                {
                    num = Convert.ToDouble(((System.Web.UI.WebControls.Label)Reitem.FindControl("PUR_RPNUM")).Text);
                    if (num == 0)
                    {
                        j++;
                    }
                }
            }
            if (j > 0)
            {
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('包含数量为0的数据,不能追加订单!');", true);
            }
            else
            {
                int    temp         = isselected();
                string ptcode_rcode = "";
                string ptcode       = "";
                if (temp == 1)
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('您没有选择数据,本次操作无效!');", true);
                }
                else if (temp == 2)
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('您选择的数据包含未审核的记录,本次操作无效!');", true);
                }
                else if (temp == 3)
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('选择的数据包含有不同的供应商的记录,本次操作无效!');", true);
                }
                else if (temp == 4)
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('选择的数据包含已下订单的记录,本次操作无效!');", true);
                }
                else if (temp == 5)
                {
                    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "alert('选择的数据包含已关闭的记录,本次操作无效!');", true);
                }
                else
                {
                    foreach (RepeaterItem Reitem in tbpc_purshaseplanassignRepeater.Items)
                    {
                        if (((System.Web.UI.WebControls.CheckBox)Reitem.FindControl("CKBOX_SELECT")).Checked)
                        {
                            ptcode = ptcode + ((System.Web.UI.WebControls.Label)Reitem.FindControl("PUR_lbpurid")).Text + ",";
                        }
                    }
                    ptcode_rcode = ptcode + Session["UserID"].ToString();
                    ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "", "mowinopen('" + ptcode_rcode + "');", true);
                }
            }
        }
コード例 #29
0
 protected void btn_QX_click(object sender, EventArgs e)
 {
     foreach (RepeaterItem Reitem in tbpc_purshaseplanassignRepeater.Items)
     {
         CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as CheckBox;
         cbx.Checked = false;
     }
 }
コード例 #30
0
 protected void btn_QX_click(object sender, EventArgs e)
 {
     foreach (RepeaterItem Reitem in Purordertotal_list_Repeater.Items)
     {
         System.Web.UI.WebControls.CheckBox cbx = Reitem.FindControl("CKBOX_SELECT") as System.Web.UI.WebControls.CheckBox;
         cbx.Checked = false;
     }
 }