Exemple #1
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_Cancle_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("是否删除?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

            if (dialogResult == DialogResult.OK)//如果点击“确定”按钮
            {
                try
                {
                    Bll_Common bllCommon = new Bll_Common();
                    DataRow    dr        = gv_SlabMatch.GetDataRow(gv_SlabMatch.FocusedRowHandle);
                    if (dr == null)
                    {
                        return;
                    }
                    if (bllCommon.DataDisabled("Tqb_Slab_Len_Match", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow()))
                    {
                        gv_StdMain_FocusedRowChanged(null, null);
                        MessageBox.Show("已删除!");


                        Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "取消钢坯定尺匹配关系");//添加操作日志
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else//如果点击“取消”按钮
            {
                return;
            }
        }
Exemple #2
0
 /// <summary>
 /// 停用
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_Stop_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult dialogResult = MessageBox.Show("是否停用?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
         if (dialogResult == DialogResult.OK)//如果点击“确定”按钮
         {
             Bll_Common bll_common = new Bll_Common();
             DataRow    dr         = gv_Main.GetDataRow(gv_Main.FocusedRowHandle);
             if (dr != null)
             {
                 if (bll_common.DataDisabled("TQB_STL_GRD_TYPE", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow()))
                 {
                     Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "停用钢种品种");//添加操作日志
                     MessageBox.Show("已停用!");
                     NewMethod();
                 }
             }
         }
         else//如果点击“取消”按钮
         {
             return;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemple #3
0
        /// <summary>
        /// 取消申请
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_QXSQ_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("是否取消?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

            if (dialogResult == DialogResult.OK)//如果点击“确定”按钮
            {
                try
                {
                    Bll_Common bllCommon = new Bll_Common();

                    DataRow dr = gv_XL.GetDataRow(gv_XL.FocusedRowHandle);
                    if (dr != null)
                    {
                        if (bllCommon.DataDisabled("TQC_UPD_MATERIAL_MAIN", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow()))
                        {
                            Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "取消修料申请信息");//添加操作日志
                            Query();
                            Query1();
                            MessageBox.Show("已取消申请!");
                        }
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else//如果点击“取消”按钮
            {
                return;
            }
        }
 /// <summary>
 /// 停用
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_Stop_CF_Click(object sender, EventArgs e)
 {
     try
     {
         DialogResult dialogResult = MessageBox.Show("是否停用?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
         if (dialogResult == DialogResult.OK)//如果点击“确定”按钮
         {
             Bll_Common bll_common = new Bll_Common();
             DataRow    dr         = gv_StdCF.GetDataRow(gv_StdCF.FocusedRowHandle);
             if (dr != null)
             {
                 if (bll_common.DataDisabled("TQB_DESIGN_ITEM", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow()))
                 {
                     MessageBox.Show("已停用!");
                     NewMethod_CF();
                     GetDesignLog_Add();
                 }
             }
         }
         else//如果点击“取消”按钮
         {
             return;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemple #5
0
        /// <summary>
        /// 停用
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_Cancle_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("是否停用?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

            if (dialogResult == DialogResult.OK)//如果点击“确定”按钮
            {
                try
                {
                    Bll_Common bllCommon = new Bll_Common();

                    DataRow dr = gv_Route.GetDataRow(gv_Route.FocusedRowHandle);
                    if (dr != null)
                    {
                        if (bllCommon.DataDisabled("tqb_route", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow()))
                        {
                            Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "停用工艺路线信息");//添加操作日志
                            BindList();
                            MessageBox.Show("已成功停用!");
                        }
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else//如果点击“取消”按钮
            {
                return;
            }
        }
Exemple #6
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_Del_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("是否删除?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

            if (dialogResult == DialogResult.OK)//如果点击“确定”按钮
            {
                try
                {
                    Bll_Common bllCommon = new Bll_Common();
                    DataRow    dr        = gv_DZGZ.GetDataRow(gv_DZGZ.FocusedRowHandle);
                    if (dr == null)
                    {
                        return;
                    }
                    if (bllCommon.DataDisabled("TQB_REPLACE_SLAB", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow()))
                    {
                        GetQuery_PPB();
                        MessageBox.Show("已删除!");


                        Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "取消待轧钢坯匹配关系");//添加操作日志
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else//如果点击“取消”按钮
            {
                return;
            }
        }
Exemple #7
0
        /// <summary>
        /// 停用
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_Stop_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult dialogResult = MessageBox.Show("是否停用?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                if (dialogResult == DialogResult.OK)//如果点击“确定”按钮
                {
                    DataRow dr = gv_Gp.GetDataRow(gv_Gp.FocusedRowHandle);
                    if (dr != null)
                    {
                        Bll_Common bllCommon = new Bll_Common();

                        if (bllCommon.DataDisabled("TQB_GP_LCP_BASIS", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow()))
                        {
                            Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "停用联产品信息");//添加操作日志

                            MessageBox.Show("已成功停用!");

                            BindGp(str_Plan_Code);
                        }
                    }
                }
                else//如果点击“取消”按钮
                {
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemple #8
0
 /// <summary>
 /// 停用
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_Stop_Click(object sender, EventArgs e)
 {
     try
     {
         int[] rownumber = gv_ZCJC.GetSelectedRows();//获取选中行号数组;
         if (rownumber.Length == 0)
         {
             return;
         }
         DialogResult dialogResult = MessageBox.Show("是否停用?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
         if (dialogResult == DialogResult.OK)//如果点击“确定”按钮
         {
             for (int i = 0; i < rownumber.Length; i++)
             {
                 int        selectedHandle = rownumber[i];
                 string     strID          = gv_ZCJC.GetRowCellValue(selectedHandle, "C_ID").ToString();
                 Bll_Common bll_common     = new Bll_Common();
                 if (bll_common.DataDisabled("TQB_TRUCK", strID, RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow()))
                 {
                     Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "停用装车检查信息");//添加操作日志
                 }
             }
             MessageBox.Show("已停用!");
             btn_Query_Click(null, null);
         }
         else//如果点击“取消”按钮
         {
             return;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemple #9
0
        /// <summary>
        /// 绑定线别数据源
        /// </summary>
        private void DataBindToLine()
        {
            DataTable dt_line = new DataTable();

            dt_line = Bll_Common.GetListOfLine(string.Empty);
            DataRow dr = dt_line.NewRow();

            dr["PLName"] = string.Empty;
            dr["PLCode"] = string.Empty;
            dt_line.Rows.InsertAt(dr, 0);
            cmb_Line.DisplayMember = "PLName";
            cmb_Line.ValueMember   = "PLCode";
            cmb_Line.DataSource    = dt_line;
        }
Exemple #10
0
        /// <summary>
        /// 质量设计变更
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_Edit_Click(object sender, EventArgs e)
        {
            try
            {
                DataRow dr_Old = gv_DesignOrder.GetDataRow(gv_DesignOrder.FocusedRowHandle);
                if (dr_Old == null)
                {
                    MessageBox.Show("请选中需要变更质量设计的数据!");
                    return;
                }

                DataRow dr_New = gv_DesignStdcodeGrd.GetDataRow(gv_DesignStdcodeGrd.FocusedRowHandle);
                if (dr_New == null)
                {
                    MessageBox.Show("请选中新的质量设计信息!");
                    return;
                }

                Mod_TQB_DESIGN_ORDER model = new Mod_TQB_DESIGN_ORDER();
                model.C_ORDER_ID       = dr_Old["订单号"].ToString();
                model.C_DESIGN_ID      = dr_New["C_ID"].ToString();
                model.C_DELIVERY_STATE = dr_Old["C_DELIVERY_STATE"].ToString();
                model.C_EMP_ID         = RV.UI.UserInfo.userID;
                model.C_EMP_ID_BG      = RV.UI.UserInfo.userID;
                model.D_MOD_DT_BG      = RV.UI.ServerTime.timeNow();
                model.N_STATUS         = 2;

                if (bllDesignOrder.Add(model))
                {
                    Bll_Common bllCommon = new Bll_Common();

                    if (bllCommon.DataDisabled("TQB_DESIGN_ORDER", dr_Old["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow()))
                    {
                        MessageBox.Show("质量设计变更成功!");

                        BindDesignByOrder();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemple #11
0
        /// <summary>
        /// 检测重复
        /// </summary>
        /// <param name="C_MENU_NAME">表名</param>
        /// <param name="C_FORMS_NAME">字段+值</param>
        /// <returns>0没有重复;>0有重复</returns>
        public static int CheckTable(string tableName, Hashtable ht)
        {
            Bll_Common bll = new Bll_Common();

            StringBuilder strSql = new StringBuilder();

            strSql.Append("select count(1) from " + tableName + " where 1=1 ");

            foreach (DictionaryEntry de in ht)
            {
                if (de.Key.ToString() == "C_ID")
                {
                    strSql.Append(" and nvl(" + de.Key + ",' ') <>nvl('" + de.Value + "',' ')  ");
                }
                else
                {
                    strSql.Append(" and nvl(" + de.Key + ",'-2018') =nvl('" + de.Value + "','-2018')  ");
                }
            }

            return(bll.CheckTable(strSql.ToString()));
        }
Exemple #12
0
        /// <summary>
        /// 停用
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_Del_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("是否停用?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

            if (dialogResult == DialogResult.OK)//如果点击“确定”按钮
            {
                try
                {
                    Bll_Common bllCommon  = new Bll_Common();
                    DataRow    dr_StdMain = gv_SQLB.GetDataRow(gv_SQLB.FocusedRowHandle);
                    int[]      rownumber  = gv_SQLB.GetSelectedRows();//获取选中行号数组;
                    if (rownumber.Length == 0)
                    {
                        MessageBox.Show("请选择需要添加的信息!");
                        return;
                    }

                    for (int si = 0; si < rownumber.Length; si++)
                    {
                        DataRow dr = gv_SQLB.GetDataRow(rownumber[si]);
                        bllCommon.DataDisabled("TQC_RECHECK", dr["C_ID"].ToString(), RV.UI.UserInfo.userID, RV.UI.ServerTime.timeNow());
                        Common.UserLog.AddLog(strMenuName, this.Name, this.Text, "停用复检信息");//添加操作日志
                    }
                    Query_SQ();
                    MessageBox.Show("已删除!");
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else//如果点击“取消”按钮
            {
                return;
            }
        }
Exemple #13
0
        private void FrmStationSelect_Load(object sender, EventArgs e)
        {
            //初始化线别下拉框
            DataTable dt_pl = Bll_Common.GetListOfLine(string.Empty);
            DataRow   dr_pl = dt_pl.NewRow();

            dr_pl["PLName"] = string.Empty;
            dr_pl["PLCode"] = "-1";
            dt_pl.Rows.InsertAt(dr_pl, 0);
            cbo_plCode.DataSource    = dt_pl;
            cbo_plCode.DisplayMember = "PLName";
            cbo_plCode.ValueMember   = "PLCode";

            //初始化datagridview数据源
            string strWhere = " 1=1";

            if (this.group_type != string.Empty)
            {
                strWhere += string.Format(@"and g.GROUP_TYPE='{0}'", group_type);
            }
            DataTable dt = t_Bllb_station_tbs_BLL.Query(strWhere);

            dgv_workStation.DataSource = dt;
        }