Exemple #1
0
    //删除
    protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        //判断当前记录是否可以删除
        string strCode      = e.Values["RMES_ID"].ToString();
        string strSSeq      = e.Values["STATION_SEQ"].ToString();
        string strPCode     = e.Values["PLINE_CODE"].ToString();
        string strTableName = "CODE_STATION";

        dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strCode + "') from dual");

        theDataConn.OpenConn();
        string theRet = theDataConn.GetValue();

        if (theRet != "Y")
        {
            ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
            ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
            theDataConn.CloseConn();
        }
        else
        {
            //确认删除
            string Sql = "delete from CODE_STATION WHERE  COMPANY_CODE = '" + theCompanyCode + "' and RMES_ID = '" + strCode + "' AND PLINE_CODE='" + strPCode + "' ";
            dc.ExeSql(Sql);
            string UpSql = "UPDATE CODE_STATION SET STATION_SEQ = STATION_SEQ-1 WHERE COMPANY_CODE = '" + theCompanyCode + "'and STATION_SEQ >= '" + strSSeq + "' AND PLINE_CODE='" + strPCode + "' ";
            dc.ExeSql(UpSql);
        }


        setCondition();
        e.Cancel = true;
    }
Exemple #2
0
        protected void cmdReplaceByPlan_Click(object sender, EventArgs e)
        {
            //按计划替换
            userManager theUserManager = (userManager)Session["theUserManager"];
            string      userName       = theUserManager.getUserName();

            dataConn theDataConn = new dataConn();

            theDataConn.theComd.CommandType = CommandType.StoredProcedure;
            theDataConn.theComd.CommandText = "MW_HANDLE_LJTH";

            theDataConn.theComd.Parameters.Add("JHRQ1", OracleDbType.Varchar2).Value           = dtRq.Text;
            theDataConn.theComd.Parameters.Add("JHDM1", OracleDbType.Varchar2).Value           = Session["planCode"].ToString();
            theDataConn.theComd.Parameters.Add("JHSO1", OracleDbType.Varchar2).Value           = Session["so"].ToString();
            theDataConn.theComd.Parameters.Add("GZDD1", OracleDbType.Varchar2).Value           = cmbPline.Value.ToString();
            theDataConn.theComd.Parameters.Add("USER1", OracleDbType.Varchar2).Value           = userName;
            theDataConn.theComd.Parameters.Add("THRQBS1", OracleDbType.Varchar2).Value         = "0";
            theDataConn.theComd.Parameters.Add("THLXBS1", OracleDbType.Varchar2).Value         = "0";
            theDataConn.theComd.Parameters.Add("OUTSTR1", OracleDbType.Varchar2, 50).Direction = ParameterDirection.Output;
            theDataConn.OpenConn();
            theDataConn.theComd.ExecuteNonQuery();

            string retVal = theDataConn.theComd.Parameters["OUTSTR1"].Value.ToString();

            theDataConn.CloseConn();

            if (retVal == "0")
            {
                showAlert(this, "处理完毕,请到手工处理界面检查需手工处理部分!");
            }
            else
            {
                showAlert(this, retVal);
            }
        }
Exemple #3
0
    // 新增
    protected void ASPxGridView1_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
    {
        ASPxTextBox  pCode   = ASPxGridView1.FindEditFormTemplateControl("txtPCode") as ASPxTextBox;
        ASPxTextBox  pName   = ASPxGridView1.FindEditFormTemplateControl("txtPName") as ASPxTextBox;
        ASPxTextBox  pNameEn = ASPxGridView1.FindEditFormTemplateControl("txtPNameEn") as ASPxTextBox;
        ASPxTextBox  pValue  = ASPxGridView1.FindEditFormTemplateControl("txtPValue") as ASPxTextBox;
        ASPxCheckBox chRFlag = ASPxGridView1.FindEditFormTemplateControl("chRFlag") as ASPxCheckBox;

        //string sql = "select 'PROG'||TRIM(TO_CHAR(SEQ_USER_ID.NEXTVAL,'000000')) from dual";
        //theDc.setTheSql(sql);
        //string dece_code1 = theDc.GetValue();
        string dece_code1 = pCode.Text.Trim();
        string rFlag      = "";

        if (chRFlag.Checked == true)
        {
            rFlag = "Y";
        }
        else
        {
            rFlag = "N";
        }

        string inSql = "INSERT INTO CODE_PROGRAM (COMPANY_CODE, PROGRAM_CODE, PROGRAM_NAME, PROGRAM_NAME_EN, PROGRAM_VALUE, RIGHT_FLAG) "
                       + "VALUES('" + theCompanyCode + "','" + dece_code1 + "','" + pName.Text.Trim() + "','" + pNameEn.Text.Trim() + "','" + pValue.Text.Trim() + "','" + rFlag + "')";
        dataConn inDc = new dataConn();

        inDc.ExeSql(inSql);
        inDc.CloseConn();

        e.Cancel = true;
        ASPxGridView1.CancelEdit();
        queryFunction();
    }
Exemple #4
0
        //删除
        protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
        {
            //判断当前记录是否可以删除
            string   strPART      = e.Values["PART"].ToString();
            string   strPCode     = e.Values["GZDD"].ToString();
            string   strTableName = "atpubkflpart";
            dataConn theDataConn  = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strPART + "') from dual");

            theDataConn.OpenConn();
            string theRet = theDataConn.GetValue();

            if (theRet != "Y")
            {
                ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
                ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
                theDataConn.CloseConn();
            }
            else
            {
                //确认删除
                string Sql = "delete from atpubkflpart where part='" + strPART + "' and gzdd='" + strPCode + "' ";
                dc.ExeSql(Sql);
            }
            setCondition();
            e.Cancel = true;
        }
Exemple #5
0
        protected void cmdReplaceByPlan_Click(object sender, EventArgs e)
        {
            //按计划替换
            userManager theUserManager = (userManager)Session["theUserManager"];
            string      userName       = theUserManager.getUserName();

            dataConn theDataConn = new dataConn();

            theDataConn.theComd.CommandType = CommandType.StoredProcedure;
            theDataConn.theComd.CommandText = "MW_HANDLE_LJTH";

            theDataConn.theComd.Parameters.Add("JHRQ1", OracleDbType.Varchar2).Value           = dtRq.Text;
            theDataConn.theComd.Parameters.Add("JHDM1", OracleDbType.Varchar2).Value           = gridPlan.SelectedItem.GetValue("PLAN_CODE");
            theDataConn.theComd.Parameters.Add("JHSO1", OracleDbType.Varchar2).Value           = gridPlan.SelectedItem.GetValue("PLAN_SO");
            theDataConn.theComd.Parameters.Add("GZDD1", OracleDbType.Varchar2).Value           = cmbPline.Value.ToString();
            theDataConn.theComd.Parameters.Add("USER1", OracleDbType.Varchar2).Value           = userName;
            theDataConn.theComd.Parameters.Add("THRQBS1", OracleDbType.Varchar2).Value         = "0";
            theDataConn.theComd.Parameters.Add("THLXBS1", OracleDbType.Varchar2).Value         = "0";
            theDataConn.theComd.Parameters.Add("OUTSTR1", OracleDbType.Varchar2, 50).Direction = ParameterDirection.Output;
            theDataConn.OpenConn();
            theDataConn.theComd.ExecuteNonQuery();

            string retVal = theDataConn.theComd.Parameters["OUTSTR1"].Value.ToString();

            theDataConn.CloseConn();

            if (retVal == "0")
            {
                Response.Write("<script>alert('处理完毕,请到手工处理界面检查需手工处理部分!');</script>");
            }
            else
            {
                Response.Write("<script>alert('" + retVal + "');</script>");
            }
        }
Exemple #6
0
    protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        //判断当前记录是否可以删除
        string strDelCode   = e.Values["VENDOR_CODE"].ToString();
        string strTableName = "CODE_VENDOR";

        dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strDelCode + "') from dual");

        theDataConn.OpenConn();
        string theRet = theDataConn.GetValue();

        if (theRet != "Y")
        {
            ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
            ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
            theDataConn.CloseConn();
        }
        else
        {
            //删除操作
            string Sql = "delete from CODE_VENDOR WHERE  COMPANY_CODE = '" + theCompanyCode + "' and VENDOR_CODE = '" + strDelCode + "'";
            dc.ExeSql(Sql);
        }


        setCondition();
        e.Cancel = true;
    }
Exemple #7
0
        protected void BtnUpdate1_Click(object sender, EventArgs e)
        {
            try
            {
                int count1 = ASPxGridView1.Selection.Count;
                if (count1 != 1)
                {
                    showAlert(this, "请选择单条处理!");
                    return;
                }
                List <object> aa  = ASPxGridView1.GetSelectedFieldValues("RMES_ID");
                string        sql = "select count(1) from data_process_note where rmes_id='" + aa[0] + "' and (note_type='C' or note_type='D' or note_type='E')";
                if (dc.GetValue(sql) == "0")
                {
                    showAlert(this, "待处理数据类型错误,只能选择so、组件相关装机提示!");
                    return;
                }

                dataConn theDataConn = new dataConn();
                theDataConn.theComd.CommandType = CommandType.StoredProcedure;
                theDataConn.theComd.CommandText = "MW_UPDATE_ZJTS";
                theDataConn.theComd.Parameters.Add("TYPE1", OracleDbType.Varchar2).Value   = "ONE";
                theDataConn.theComd.Parameters.Add("RMESID1", OracleDbType.Varchar2).Value = aa[0];
                theDataConn.OpenConn();
                theDataConn.theComd.ExecuteNonQuery();
                theDataConn.CloseConn();
                showAlert(this, "处理成功!");
            }
            catch (Exception e1)
            {
                showAlert(this, e1.Message.ToString());
            }
        }
Exemple #8
0
        //删除
        protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
        {
            //判断当前记录是否可以删除
            string strD = e.Values["ABOM_COMP"].ToString();

            string strTableName = "ATPUBOMKZB";

            dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','MES','MES','MES','MES','" + strD + "') from dual");

            theDataConn.OpenConn();
            string theRet = theDataConn.GetValue();

            if (theRet != "Y")
            {
                ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
                ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
                theDataConn.CloseConn();
            }
            else
            {
                //记录操作start
                string logSql = "insert into atpubomkzb_log(abom_comp,zdrq,rqbegin,rqend,rqsj,yhmc,czms) "
                                + " select abom_comp,zdrq,rqbegin,rqend,sysdate,'" + theUserName + "','删除了该零件' "
                                + " from  atpubomkzb where abom_comp='" + strD + "'";
                dc.ExeSql(logSql);
                //记录操作end

                //确认删除
                string Sql = "delete from ATPUBOMKZB WHERE  ABOM_COMP =  '" + strD + "' ";
                dc.ExeSql(Sql);
            }
            e.Cancel = true;
            setCondition1();
        }
Exemple #9
0
        //删除
        protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
        {
            //判断当前记录是否可以删除
            string   strMCode     = e.Values["MATERIAL_CODE"].ToString();
            string   strPCode     = e.Values["GZDD"].ToString();
            string   strOLocation = e.Values["ONLINE_LOCATION"].ToString();
            string   strQadsite   = e.Values["QADSITE"].ToString();
            string   strTableName = "ms_single_mat_inner";
            string   flag         = e.Values["FLAG"].ToString();
            dataConn theDataConn  = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strMCode + "') from dual");

            theDataConn.OpenConn();
            string theRet = theDataConn.GetValue();

            //弹框提示已经计算的不能删除
            if (flag == "Y")
            {
                ASPxGridView1.JSProperties.Add("cpCallbackName", "Fail");
                ASPxGridView1.JSProperties.Add("cpCallbackRet", "已经计算的不能删除!");
            }
            else if (theRet != "Y")
            {
                ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
                ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
                theDataConn.CloseConn();
            }
            else
            {
                //确认删除
                string Sql = "delete from ms_single_mat_inner where material_code='" + strMCode + "' and ONLINE_LOCATION='" + strOLocation + "' and flag='N' and gzdd='" + strPCode + "' and qadsite='" + strQadsite + "'";
                dc.ExeSql(Sql);
            }
            setCondition();
            e.Cancel = true;
        }
Exemple #10
0
        //删除
        protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
        {
            //判断当前记录是否可以删除
            string strCode      = e.Values["SO"].ToString();
            string strTableName = "ATPUSOTJB";

            dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strCode + "') from dual");

            theDataConn.OpenConn();
            string theRet = theDataConn.GetValue();

            if (theRet != "Y")
            {
                ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
                ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
                theDataConn.CloseConn();
            }
            else
            {
                //插入日志表
                string logSql = "INSERT INTO ATPUSOTJLOG (SO,TJLX,YHMC,RQSJ,CZSM) "
                                + "VALUES( '" + e.Values["SO"].ToString() + "','" + e.Values["TJLX"].ToString() + "','" + theUserName + "',sysdate,'DEL')";
                dc.ExeSql(logSql);
                //确认删除
                string Sql = "delete from ATPUSOTJB WHERE  SO =  '" + strCode + "'";
                dc.ExeSql(Sql);
            }

            e.Cancel = true;
            setCondition();
        }
Exemple #11
0
        protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
        {
            //判断当前记录是否可以删除
            string strDelCode = e.Values["XH"].ToString();
            string ljlb = e.Values["ZYLJLB"].ToString();
            string strTableName = "";
            if (ljlb == "装配重要零件")
            {
                strTableName = "DMZYLJB";
            }
            else
            {
                strTableName = "DMJCLJB";
            }
            dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strDelCode + "') from dual");

            theDataConn.OpenConn();
            string theRet = theDataConn.GetValue();
            if (theRet != "Y")
            {
                ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
                ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
                theDataConn.CloseConn();
            }
            else
            {
                //插入到日志表
                try
                {
                    if (strTableName == "DMZYLJB")
                    {
                        string Sql2 = "INSERT INTO DMZYLJB_LOG (LJDM,LJMC,XH,GZDD,LJLB,user_code,flag,rqsj)"
                            + " SELECT LJDM,LJMC,XH,GZDD,LJLB,'" + theUserCode + "' , 'DEL', SYSDATE FROM DMZYLJB WHERE XH = '" + strDelCode + "'";
                        dc.ExeSql(Sql2);
                    }
                    if (strTableName == "DMJCLJB")
                    {
                        string Sql2 = "INSERT INTO DMJCLJB_LOG (LJDM,LJMC,XH,GZDD,user_code,flag,rqsj)"
                            + " SELECT LJDM,LJMC,XH,GZDD,LJLB,'" + theUserCode + "' , 'DEL', SYSDATE FROM DMJCLJB WHERE XH = '" + strDelCode + "'";
                        dc.ExeSql(Sql2);
                    }
                }
                catch
                {
                    return;
                }
                //确认删除
                string Sql = "delete from " + strTableName + " WHERE   XH = '" + strDelCode + "'";
                dc.ExeSql(Sql);
            }
            setCondition();
            e.Cancel = true;
        }
Exemple #12
0
    //删除
    protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        //判断当前记录是否可以删除
        string strCode      = e.Values["RMES_ID"].ToString();
        string strTableName = "CODE_SN";

        dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strCode + "') from dual");

        theDataConn.OpenConn();
        string theRet = theDataConn.GetValue();

        if (theRet != "Y")
        {
            ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
            ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
            theDataConn.CloseConn();
        }
        else
        {
            //确认删除
            //插入到日志表20161101
            try
            {
                string Sql1 = " SELECT * FROM CODE_SN WHERE rmes_id='" + strCode + "'";
                dc.setTheSql(Sql1);
                string rmes_id       = dc.GetTable().Rows[0]["RMES_ID"].ToString();
                string company_code  = dc.GetTable().Rows[0]["COMPANY_CODE"].ToString();
                string pline_code    = dc.GetTable().Rows[0]["PLINE_CODE"].ToString();
                string INITIAL_VALUE = dc.GetTable().Rows[0]["INITIAL_VALUE"].ToString();
                string CURRENT_VALUE = dc.GetTable().Rows[0]["CURRENT_VALUE"].ToString();
                string MAX_VALUE     = dc.GetTable().Rows[0]["MAX_VALUE"].ToString();
                string INCREASE_FLAG = dc.GetTable().Rows[0]["INCREASE_FLAG"].ToString();
                string ENABLE_FLAG   = dc.GetTable().Rows[0]["ENABLE_FLAG"].ToString();
                string WARNING_VALUE = dc.GetTable().Rows[0]["WARNING_VALUE"].ToString();
                string VENDER_CODE   = dc.GetTable().Rows[0]["VENDER_CODE"].ToString();

                string Sql2 = "INSERT INTO CODE_SN_LOG (RMES_ID,COMPANY_CODE,PLINE_CODE,INITIAL_VALUE,CURRENT_VALUE,MAX_VALUE,INCREASE_FLAG,ENABLE_FLAG,WARNING_VALUE,VENDER_CODE,user_code,flag,rqsj)"
                              + "VALUES('" + rmes_id + "','" + theCompanyCode + "','" + pline_code + "','" + INITIAL_VALUE + "','" + CURRENT_VALUE + "','" + MAX_VALUE + "','" + INCREASE_FLAG + "','" + ENABLE_FLAG + "','" + WARNING_VALUE + "','" + VENDER_CODE + "','" + theUserCode + "','DEL',SYSDATE)";
                dc.ExeSql(Sql2);
            }
            catch
            {
                return;
            }

            string Sql = "delete from CODE_SN WHERE  COMPANY_CODE = '" + theCompanyCode + "' and RMES_ID = '" + strCode + "'";
            dc.ExeSql(Sql);
        }


        setCondition();
        e.Cancel = true;
    }
Exemple #13
0
    protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        //判断当前记录是否可以删除
        string strDelCode   = e.Values["RMES_ID"].ToString();
        string strTableName = "DATA_ROUNTING_REMARK";

        dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strDelCode + "') from dual");

        theDataConn.OpenConn();
        string theRet = theDataConn.GetValue();

        if (theRet != "Y")
        {
            ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
            ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
            theDataConn.CloseConn();
        }
        else
        {
            //插入到日志表
            try
            {
                string Sql1 = " SELECT * FROM DATA_ROUNTING_REMARK WHERE rmes_id='" + strDelCode + "'";
                dc.setTheSql(Sql1);
                string rmes_id         = dc.GetTable().Rows[0]["RMES_ID"].ToString();
                string company_code    = dc.GetTable().Rows[0]["COMPANY_CODE"].ToString();
                string ROUNTING_REMARK = dc.GetTable().Rows[0]["ROUNTING_REMARK"].ToString();
                string PLINE_CODE      = dc.GetTable().Rows[0]["PLINE_CODE"].ToString();
                string GS    = dc.GetTable().Rows[0]["GS"].ToString();
                string XL    = dc.GetTable().Rows[0]["XL"].ToString();
                string PL    = dc.GetTable().Rows[0]["PL"].ToString();
                string RL    = dc.GetTable().Rows[0]["RL"].ToString();
                string ISDK  = dc.GetTable().Rows[0]["ISDK"].ToString();
                string ISEGR = dc.GetTable().Rows[0]["ISEGR"].ToString();

                string Sql2 = "INSERT INTO DATA_ROUNTING_REMARK_LOG (RMES_ID,COMPANY_CODE,rounting_remark,pline_code,gs,xl,pl,rl,isdk,isegr,user_code,flag,rqsj)"
                              + "VALUES('" + strDelCode + "','" + theCompanyCode + "','" + ROUNTING_REMARK + "','" + PLINE_CODE + "','" + GS + "','" + XL + "','" + PL + "','" + RL + "','" + ISDK + "','" + ISEGR + "','" + theUserCode + "','DEL',SYSDATE)";
                dc.ExeSql(Sql2);
            }
            catch
            {
                return;
            }
            //确认删除
            string Sql = "delete from DATA_ROUNTING_REMARK WHERE RMES_ID = '" + strDelCode + "'";
            dc.ExeSql(Sql);
        }


        setCondition();
        e.Cancel = true;
    }
Exemple #14
0
    // 新增
    protected void ASPxGridView1_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
    {
        ASPxTextBox     uCode   = ASPxGridView1.FindEditFormTemplateControl("txtUCode") as ASPxTextBox;
        ASPxTextBox     uName   = ASPxGridView1.FindEditFormTemplateControl("txtUName") as ASPxTextBox;
        ASPxRadioButton radM    = ASPxGridView1.FindEditFormTemplateControl("RadMan") as ASPxRadioButton;
        ASPxRadioButton radW    = ASPxGridView1.FindEditFormTemplateControl("RadWoman") as ASPxRadioButton;
        ASPxTextBox     authIp  = ASPxGridView1.FindEditFormTemplateControl("txtIp") as ASPxTextBox;
        ASPxTextBox     uMax    = ASPxGridView1.FindEditFormTemplateControl("TextBoxMax") as ASPxTextBox;
        ASPxTextBox     uTel    = ASPxGridView1.FindEditFormTemplateControl("txtTel") as ASPxTextBox;
        ASPxTextBox     uEmail  = ASPxGridView1.FindEditFormTemplateControl("txtEmail") as ASPxTextBox;
        ASPxTextBox     uQQ     = ASPxGridView1.FindEditFormTemplateControl("TextQQ") as ASPxTextBox;
        ASPxTextBox     uWeChat = ASPxGridView1.FindEditFormTemplateControl("txtWeChat") as ASPxTextBox;
        ASPxCheckBox    chVFlag = ASPxGridView1.FindEditFormTemplateControl("chValidFlag") as ASPxCheckBox;
        ASPxCheckBox    chLFlag = ASPxGridView1.FindEditFormTemplateControl("chLockFlag") as ASPxCheckBox;
        ASPxComboBox    uDept   = ASPxGridView1.FindEditFormTemplateControl("txtDept") as ASPxComboBox;
        string          vFlag   = "";

        if (chVFlag.Checked == true)
        {
            vFlag = "Y";
        }
        else
        {
            vFlag = "N";
        }

        string uSex = "";

        if (radM.Checked == true)
        {
            uSex = "M";
        }
        if (radW.Checked == true)
        {
            uSex = "F";
        }
        string email = uEmail.Text.Trim();

        email = email.Replace("@", "@@");
        string inSql = "INSERT INTO CODE_USER (COMPANY_CODE, USER_ID, USER_CODE, USER_NAME, USER_SEX, USER_PASSWORD,USER_AUTHORIZED_IP,USER_MAXNUM,VALID_FLAG,LOCK_FLAG,USER_EMAIL,USER_TEL,USER_QQ,USER_WECHAT,USER_DEPT_CODE,user_type) "
                       + "VALUES('" + theCompanyCode + "',TRIM(TO_CHAR(SEQ_USER_ID.NEXTVAL,'000000')),'" + uCode.Text.Trim().ToUpper() + "','" + uName.Text.Trim() + "','" + uSex + "','" + thePubPc.AESEncrypt(uCode.Text.Trim().ToUpper()) + "',"
                       + "'" + authIp.Text.Trim() + "','" + uMax.Text.Trim() + "','" + vFlag + "','0','" + email + "','" + uTel.Text.Trim() + "','" + uQQ.Text.Trim() + "','" + uWeChat.Text.Trim() + "','" + uDept.Value.ToString() + "','A')";
        dataConn inDc = new dataConn();

        inDc.ExeSql(inSql);
        inDc.CloseConn();

        e.Cancel = true;
        ASPxGridView1.CancelEdit();
        queryFunction();
    }
Exemple #15
0
    // 新增
    protected void ASPxGridView1_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
    {
        ASPxTextBox uCode = ASPxGridView1.FindEditFormTemplateControl("txtUCode") as ASPxTextBox;
        ASPxTextBox uName = ASPxGridView1.FindEditFormTemplateControl("txtUName") as ASPxTextBox;

        string inSql = "INSERT INTO CODE_USER (COMPANY_CODE, USER_ID, USER_CODE, USER_NAME,user_type) "
                       + "VALUES('" + theCompanyCode + "',TRIM(TO_CHAR(SEQ_USER_ID.NEXTVAL,'000000')),'" + uCode.Text.Trim().ToUpper() + "','" + uName.Text.Trim() + "' ,'B')";
        dataConn inDc = new dataConn();

        inDc.ExeSql(inSql);
        inDc.CloseConn();

        e.Cancel = true;
        ASPxGridView1.CancelEdit();
        queryFunction();
    }
Exemple #16
0
    protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        //判断当前记录是否可以删除
        string strDelCode   = e.Values["SO"].ToString();
        string strTableName = "ATPUEPAINTPROCOLOR";

        dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strDelCode + "') from dual");

        theDataConn.OpenConn();
        string theRet = theDataConn.GetValue();

        if (theRet != "Y")
        {
            ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
            ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
            theDataConn.CloseConn();
        }
        else
        {
            //插入到日志表
            try
            {
                string Sql1 = " SELECT * FROM ATPUEPAINTPROCOLOR WHERE SO='" + strDelCode + "'";
                dc.setTheSql(Sql1);
                string SITE  = dc.GetTable().Rows[0]["SITE"].ToString();
                string PROC  = dc.GetTable().Rows[0]["PROC"].ToString();
                string COLOR = dc.GetTable().Rows[0]["COLOR"].ToString();

                string Sql2 = "INSERT INTO ATPUEPAINTPROCOLOR_LOG(SO,SITE,PROC,COLOR,USER_CODE,FLAG,RQSJ)"
                              + "VALUES('" + strDelCode + "','" + SITE + "','" + PROC + "','" + COLOR + "','" + theUserCode + "','DEL',SYSDATE)";
                dc.ExeSql(Sql2);
            }
            catch
            {
                return;
            }
            //确认删除
            string Sql = "delete from ATPUEPAINTPROCOLOR WHERE   SO = '" + strDelCode + "'";
            dc.ExeSql(Sql);
        }


        setCondition();
        e.Cancel = true;
    }
Exemple #17
0
    // 新增
    protected void ASPxGridView1_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
    {
        string code   = e.NewValues["TEAM_CODE"].ToString().Trim();
        string name   = e.NewValues["TEAM_NAME"].ToString().Trim();
        string pline  = e.NewValues["PLINE_CODE"].ToString();
        string leader = e.NewValues["LEADER_CODE"].ToString();

        string inSql = "INSERT INTO CODE_TEAM (RMES_ID, COMPANY_CODE, TEAM_CODE, TEAM_NAME, PLINE_CODE,LEADER_CODE) "
                       + "VALUES(SEQ_RMES_ID.NEXTVAL,'" + theCompanyCode + "','" + code + "','" + name + "','" + pline + "','" + leader + "')";
        dataConn inDc = new dataConn();

        inDc.ExeSql(inSql);
        inDc.CloseConn();

        e.Cancel = true;
        ASPxGridView1.CancelEdit();
        queryFunction();
    }
Exemple #18
0
 protected void BtnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         dataConn theDataConn = new dataConn();
         theDataConn.theComd.CommandType = CommandType.StoredProcedure;
         theDataConn.theComd.CommandText = "MW_UPDATE_ZJTS";
         theDataConn.theComd.Parameters.Add("TYPE1", OracleDbType.Varchar2).Value   = "ALL";
         theDataConn.theComd.Parameters.Add("RMESID1", OracleDbType.Varchar2).Value = "";
         theDataConn.OpenConn();
         theDataConn.theComd.ExecuteNonQuery();
         theDataConn.CloseConn();
         showAlert(this, "处理成功!");
     }
     catch (Exception e1)
     {
         showAlert(this, e1.Message.ToString());
     }
 }
Exemple #19
0
    //删除
    protected void ASPxGridView2_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        //判断当前记录是否可以删除
        string   strJX        = e.Values["JXREMARK"].ToString();
        string   strPD        = e.Values["PANDUAN"].ToString();
        string   strTableName = "JWYF";
        dataConn theDataConn  = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strJX + "') from dual");



        theDataConn.OpenConn();
        string theRet = theDataConn.GetValue();

        if (theRet != "Y")
        {
            ASPxGridView2.JSProperties.Add("cpCallbackName", "Delete");
            ASPxGridView2.JSProperties.Add("cpCallbackRet", theRet);
            theDataConn.CloseConn();
        }
        else
        {
            //插入到日志表
            try
            {
                string Sql2 = "INSERT INTO JWYF_LOG (JXREMARK,PANDUAN,user_code,flag,rqsj)"
                              + " SELECT JXREMARK,PANDUAN,'" + theUserCode + "' , 'DEL', SYSDATE FROM JWYF WHERE PANDUAN = '" + strPD + "'";
                dc.ExeSql(Sql2);
            }
            catch
            {
                return;
            }

            //确认删除
            string Sql = "delete from JWYF WHERE JXREMARK = '" + strJX + "'and PANDUAN = '" + strPD + "'";
            dc.ExeSql(Sql);
        }


        setCondition();
        e.Cancel = true;
    }
Exemple #20
0
    protected void ASPxGridView1_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
    {
        ASPxTextBox  SCode       = ASPxGridView1.FindEditFormTemplateControl("txtSpecialCode") as ASPxTextBox;
        ASPxTextBox  SName       = ASPxGridView1.FindEditFormTemplateControl("txtSpecialName") as ASPxTextBox;
        ASPxComboBox PlineCode   = ASPxGridView1.FindEditFormTemplateControl("PlineCombo") as ASPxComboBox;
        ASPxComboBox StationCode = ASPxGridView1.FindEditFormTemplateControl("StationCombo") as ASPxComboBox;



        string inSql = "INSERT INTO CODE_STATION_SPECIAL (COMPANY_CODE, STATION_SPECIAL_CODE, STATION_SPECIAL_NAME, PLINE_CODE, STATION_CODE) "
                       + "VALUES('" + companyCode + "','" + SCode.Text.Trim() + "','" + SName.Text.Trim() + "','" + PlineCode.SelectedItem.Value.ToString() + "','" + StationCode.Value.ToString() + "')";
        dataConn inDc = new dataConn();

        inDc.ExeSql(inSql);
        inDc.CloseConn();

        e.Cancel = true;
        ASPxGridView1.CancelEdit();
        queryFunction();
    }
Exemple #21
0
        protected void ASPxGridView2_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
        {
            //判断当前记录是否可以删除
            string strDelCode   = e.Values["PART"].ToString();
            string strCzts      = e.Values["CZTS"].ToString();
            string strGxdm      = e.Values["GXDM"].ToString();
            string strPlancode  = e.Values["JHDM"].ToString();
            string strType      = e.Values["TSTYPE"].ToString();
            string strTableName = "RST_ATPU_ZJTS";

            dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strCzts + "') from dual");

            theDataConn.OpenConn();
            string theRet = theDataConn.GetValue();

            if (theRet != "Y")
            {
                ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
                ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
                theDataConn.CloseConn();
            }
            else
            {
                //确认删除
                string Lsql = "insert into RST_ATPU_ZJTS_LOG(PART,CZTS,GXDM,GZDD,JHDM,JHSO,TSTYPE,RQSJ,WJPATH,NOTE_COLOR,NOTE_FONT,EDIT_USER,EDIT_FLAG,EDIT_DATE)select PART,CZTS,GXDM,GZDD,JHDM,JHSO,TSTYPE,RQSJ,WJPATH,NOTE_COLOR,NOTE_FONT, "
                              + "'" + theUserName + "','DEL',SYSDATE FROM RST_ATPU_ZJTS WHERE PART = '" + strDelCode + "' and CZTS='" + strCzts + "' and GXDM='" + strGxdm + "' and JHDM='" + strPlancode + "' and TSTYPE='" + strType + "'";
                dc.ExeSql(Lsql);
                string Sql = "delete from RST_ATPU_ZJTS WHERE PART = '" + strDelCode + "' and CZTS='" + strCzts + "' and GXDM='" + strGxdm + "' and JHDM='" + strPlancode + "' and TSTYPE='" + strType + "'";
                dc.ExeSql(Sql);
            }


            //if (Session["inv9501sql"] as string != "")
            //{
            //    DataTable dt2 = dc.GetTable(Session["inv9501sql"] as string);
            //    ASPxGridView2.DataSource = dt2;
            //    ASPxGridView2.DataBind();
            //}
            SetCondition();
            e.Cancel = true;
        }
Exemple #22
0
        protected void ASPxGridView1_RowDeleting1(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
        {
            //判断当前记录是否可以删除
            string dPLine       = e.Values["GZDD"].ToString();
            string dZddm        = e.Values["ZDMC"].ToString();
            string dLjdm        = e.Values["LJDM"].ToString();
            string strTableName = "ATPUZDLJMLB";

            dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','MES','MES','" + dPLine + "','" + dZddm + "','" + dLjdm + "') from dual");

            theDataConn.OpenConn();
            string theRet = theDataConn.GetValue();

            if (theRet != "Y")
            {
                ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
                ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
                theDataConn.CloseConn();
            }
            else
            {
                //插入到日志表
                try
                {
                    string Sql2 = "INSERT INTO ATPUZDLJMLB_LOG (GZDD,SO,ZDDM,ZDMC,LJDM,LJMC,user_code,flag,rqsj,PART_ABC)"
                                  + " SELECT GZDD,SO,ZDDM,ZDMC,LJDM,LJMC,'" + theUserCode + "' , 'DEL', SYSDATE,PART_ABC FROM ATPUZDLJMLB "
                                  + "WHERE  GZDD =  '" + dPLine + "' and ZDMC =  '" + dZddm + "' and LJDM =  '" + dLjdm + "'";
                    dc.ExeSql(Sql2);
                }
                catch
                {
                    return;
                }
                //确认删除
                string Sql = "delete from ATPUZDLJMLB WHERE   GZDD =  '" + dPLine + "' and ZDMC =  '" + dZddm + "' and LJDM =  '" + dLjdm + "'";
                dc.ExeSql(Sql);
            }

            e.Cancel = true;
            setCondition();
        }
Exemple #23
0
        protected void ASPxGridView2_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
        {
            //判断当前记录是否可以删除
            string dPLine = e.Values["PLINE_CODE"].ToString();

            string dLjmc        = e.Values["ABOM_DESC"].ToString();
            string strTableName = "ATPUSMLJB";

            dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','MES','MES','MES','MES','" + dLjmc + "') from dual");

            theDataConn.OpenConn();
            string theRet = theDataConn.GetValue();

            if (theRet != "Y")
            {
                ASPxGridView2.JSProperties.Add("cpCallbackName", "Delete");
                ASPxGridView2.JSProperties.Add("cpCallbackRet", theRet);
                theDataConn.CloseConn();
            }
            else
            {
                //插入到日志表
                try
                {
                    string Sql2 = "INSERT INTO ATPUSMLJB_LOG (PLINE_CODE,ABOM_DESC,PART_ABC,user_code,flag,rqsj)"
                                  + " SELECT PLINE_CODE,ABOM_DESC,PART_ABC,'" + theUserCode + "' , 'DEL', SYSDATE FROM ATPUSMLJB "
                                  + "WHERE  PLINE_CODE =  '" + dPLine + "' and ABOM_DESC =  '" + dLjmc + "'";
                    dc.ExeSql(Sql2);
                }
                catch
                {
                    return;
                }
                //确认删除
                string Sql = "delete from ATPUSMLJB WHERE   PLINE_CODE =  '" + dPLine + "' and ABOM_DESC =  '" + dLjmc + "'";
                dc.ExeSql(Sql);
            }

            setCondition();
            e.Cancel = true;
        }
Exemple #24
0
    protected void ASPxGridView1_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
    {
        ASPxTextBox  LCode     = ASPxGridView1.FindEditFormTemplateControl("txtLocationCode") as ASPxTextBox;
        ASPxTextBox  LName     = ASPxGridView1.FindEditFormTemplateControl("txtLocationName") as ASPxTextBox;
        ASPxTextBox  LOrder    = ASPxGridView1.FindEditFormTemplateControl("txtLocationOrder") as ASPxTextBox;
        ASPxTextBox  LManhour  = ASPxGridView1.FindEditFormTemplateControl("txtLocationManhour") as ASPxTextBox;
        ASPxComboBox PlineCode = ASPxGridView1.FindEditFormTemplateControl("ASPxComboBox1") as ASPxComboBox;



        string inSql = "INSERT INTO CODE_LOCATION (RMES_ID, COMPANY_CODE, LOCATION_CODE, LOCATION_NAME, PLINE_CODE, LOCATION_SEQ, LOCATION_MANHOUR) "
                       + "VALUES(SEQ_RMES_ID.nextval, '" + companyCode + "','" + LCode.Text.Trim() + "','" + LName.Text.Trim() + "','" + PlineCode.SelectedItem.Value.ToString() + "','" + LOrder.Text.Trim() + "','" + LManhour.Text.Trim() + "')";
        dataConn inDc = new dataConn();

        inDc.ExeSql(inSql);
        inDc.CloseConn();

        e.Cancel = true;
        ASPxGridView1.CancelEdit();
        queryFunction();
    }
Exemple #25
0
    protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        //判断当前记录是否可以删除
        string strDelCode   = e.Values["FDJJX"].ToString();
        string strDelCode2  = e.Values["SC"].ToString();
        string strTableName = "ATPUEMARK";

        dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strDelCode + "') from dual");

        theDataConn.OpenConn();
        string theRet = theDataConn.GetValue();

        if (theRet != "Y")
        {
            ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
            ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
            theDataConn.CloseConn();
        }
        else
        {
            //插入到日志表
            try
            {
                string Sql2 = "INSERT INTO ATPUEMARK_LOG (FDJJX,SC,RZZS1,RZZS2,RZZS3,RZG,SFMRZ,WHRQ,RYDM,user_code,flag,rqsj)"
                              + " SELECT FDJJX,SC,RZZS1,RZZS2,RZZS3,RZG,SFMRZ,WHRQ,RYDM,'" + theUserCode + "' , 'DEL', SYSDATE FROM ATPUEMARK WHERE FDJJX = '" + strDelCode + "' and SC = '" + strDelCode2 + "'";
                dc.ExeSql(Sql2);
            }
            catch
            {
                return;
            }
            //确认删除
            string Sql = "delete from ATPUEMARK WHERE   FDJJX = '" + strDelCode + "' and SC = '" + strDelCode2 + "'";
            dc.ExeSql(Sql);
        }


        setCondition();
        e.Cancel = true;
    }
Exemple #26
0
    protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        //判断当前记录是否可以删除
        string strDelCode   = e.Values["XH"].ToString();
        string strTableName = "ATPUFLGJTHZQB";

        dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strDelCode + "') from dual");

        theDataConn.OpenConn();
        string theRet = theDataConn.GetValue();

        if (theRet != "Y")
        {
            ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
            ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
            theDataConn.CloseConn();
        }
        else
        {
            //插入到日志表
            try
            {
                string Sql2 = "INSERT INTO ATPUFLGJTHZQB_LOG (XH,LOCATION_CODE,LOCATION_NAME,LJJ,CYCLE,BZ,user_code,flag,rqsj)"
                              + " SELECT XH,LOCATION_CODE,LOCATION_NAME,LJJ,CYCLE,BZ,'" + theUserCode + "' , 'DEL', SYSDATE FROM ATPUFLGJTHZQB WHERE XH = '" + strDelCode + "' ";
                dc.ExeSql(Sql2);
            }
            catch
            {
                return;
            }

            //确认删除
            string Sql = "delete from ATPUFLGJTHZQB WHERE   XH = '" + strDelCode + "'";
            dc.ExeSql(Sql);
        }


        setCondition();
        e.Cancel = true;
    }
Exemple #27
0
    //删除
    protected void ASPxGridView2_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        //判断当前记录是否可以删除
        string strCode      = e.Values["RMES_ID"].ToString();
        string strTableName = "CODE_SN_RESERVE";

        dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strCode + "') from dual");

        theDataConn.OpenConn();
        string theRet = theDataConn.GetValue();

        if (theRet != "Y")
        {
            ASPxGridView2.JSProperties.Add("cpCallbackName", "Delete");
            ASPxGridView2.JSProperties.Add("cpCallbackRet", theRet);
            theDataConn.CloseConn();
        }
        else
        {
            //插入到日志表
            try
            {
                string Sql2 = "INSERT INTO CODE_SN_RESERVE_LOG (RMES_ID,COMPANY_CODE,PLINE_CODE,SN,SN_FLAG,user_code,flag,rqsj)"
                              + "select RMES_ID,COMPANY_CODE,PLINE_CODE,SN,SN_FLAG,'" + theUserCode + "','DEL',SYSDATE from CODE_SN_RESERVE where rmes_id='" + strCode + "')";
                dc.ExeSql(Sql2);
            }
            catch
            {
                return;
            }

            //确认删除
            string Sql = "delete from CODE_SN_RESERVE WHERE  COMPANY_CODE = '" + theCompanyCode + "' and RMES_ID = '" + strCode + "'";
            dc.ExeSql(Sql);
        }


        setCondition();
        e.Cancel = true;
    }
Exemple #28
0
    protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        //判断当前记录是否可以删除
        string strDelCode = e.Values["SO"].ToString();

        string strTableName = "ATPUKHTM";

        dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strDelCode + "') from dual");

        theDataConn.OpenConn();
        string theRet = theDataConn.GetValue();

        if (theRet != "Y")
        {
            ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
            ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
            theDataConn.CloseConn();
        }
        else
        {
            //插入到日志表
            try
            {
                string Sql2 = "INSERT INTO ATPUKHTM_LOG (khmc,khh,wlh,gysdm,sn,so,bbh,user_code,flag,rqsj)"
                              + " SELECT khmc,khh,wlh,gysdm,sn,so,bbh,'" + theUserCode + "' , 'DEL', SYSDATE FROM ATPUKHTM WHERE SO = '" + strDelCode + "' AND KHMC = '" + e.Values["KHMC"] + "' ";
                dc.ExeSql(Sql2);
            }
            catch
            {
                return;
            }
            //确认删除
            string Sql = "delete from ATPUKHTM WHERE   SO = '" + strDelCode + "' and KHMC = '" + e.Values["KHMC"] + "'";
            dc.ExeSql(Sql);
        }


        setCondition();
        e.Cancel = true;
    }
Exemple #29
0
    //删除
    protected void ASPxGridView1_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
    {
        //判断当前记录是否可以删除
        string strCode      = e.Values["SO"].ToString();
        string strTableName = "JWTCMSO";

        dataConn theDataConn = new dataConn("select func_check_delete_data('" + strTableName + "','" + theCompanyCode + "','MES','MES','MES','" + strCode + "') from dual");

        theDataConn.OpenConn();
        string theRet = theDataConn.GetValue();

        if (theRet != "Y")
        {
            ASPxGridView1.JSProperties.Add("cpCallbackName", "Delete");
            ASPxGridView1.JSProperties.Add("cpCallbackRet", theRet);
            theDataConn.CloseConn();
        }
        else
        {
            //插入到日志表
            try
            {
                string Sql2 = "INSERT INTO JWTCMSO_LOG (PLINE_CODE,SO,JX,TCL,TCL1,REMARK,GNUM,user_code,flag,rqsj)"
                              + " SELECT PLINE_CODE,SO,JX,TCL,TCL1,REMARK,GNUM,'" + theUserCode + "' , 'DEL', SYSDATE FROM JWTCMSO WHERE SO = '" + strCode + "'";
                dc.ExeSql(Sql2);
            }
            catch
            {
                return;
            }

            //确认删除
            string Sql = "delete from JWTCMSO WHERE SO = '" + strCode + "'";
            dc.ExeSql(Sql);
        }


        setCondition();
        e.Cancel = true;
    }
Exemple #30
0
    protected void btnSure_Click(object sender, EventArgs e)
    {
        if (canUpdate == false)
        {
            return;
        }


        //从界面上得到输入的旧密码,新密码,确认密码
        string oldPassword     = TextBoxOldPass.Text.Trim();
        string newPassword     = TextBoxNewPass.Text.Trim();
        string newPasswordSure = TextBoxNewPassSure.Text.Trim();

        String updateSql = "update code_user set USER_PASSWORD='******',USER_OLD_PASSWORD='******'"
                           + " where COMPANY_CODE='" + theCompanyCode + "' and USER_ID='" + theUserId + "'";

        dc.ExeSql(updateSql);
        getPassword();
        dc.CloseConn();
        TextBoxOldPass.Focus();
        Response.Redirect("/Rmes/Login/RmesIndex.aspx?progCode=rmesIndex&progName=系统登录");
    }