Пример #1
0
        private void DoAdd()
        {
            string strDeviceNo = this.tbDeviceNo.Text.Trim();
            string strCompareDate = this.dtCompareDate.Value.ToString("yyyy-MM-dd HH:mm:ss");
            string strSpecType = this.tbSpecType.Text.Trim();
            string strAllowDiff = this.tbAllowDiff.Text.Trim();
            string strWeight = this.tbWeight.Text.Trim();
            string strShowWeight = this.tbShowWeight.Text.Trim();
            string strDiffWeight = this.tbDiffWeight.Text.Trim();
            string strJudgeResult = this.tbJudgeResult.Text.Trim();
            string strOperator = this.tbOperator.Text.Trim();
            string strShift = this.tbShift.Text.Trim();
            string strTerm = this.tbTerm.Text.Trim();
            string strMemo = this.tbMemo.Text.Trim();
            string strGuid = Guid.NewGuid().ToString();

            string sql  = "insert into DT_COMPAREBALANCE (FS_DEVICENO,FD_COMPAREDATE,FS_SPECTYPE,FS_NUMBER,FN_ALLOWDIFF,";
            sql += "FN_WEIGHT,FN_SHOWWEIGHT,FN_DIFFWEIGHT,FS_JUDGERESULT,FS_OPERATOR,FS_SHIFT,FS_TERM,FS_MEMO) values(";
            sql += "'" + strDeviceNo + "',to_date('" + strCompareDate + "','yyyy-MM-dd hh24:mi:ss'),'" + strSpecType + "',";
            sql += "'" + strGuid + "','" + strAllowDiff + "','" + strWeight + "','" + strShowWeight + "','" + strDiffWeight + "',";
            sql += "'" + strJudgeResult + "','" + strOperator + "','" + strShift + "','" + strTerm + "','" + strMemo + "')";

            CoreClientParam ccp = new CoreClientParam();

            ccp.ServerName = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName = "ExcuteNonQuery";
            ccp.ServerParams = new object[] { sql };
            ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
        }
Пример #2
0
        //从数据库获取磅房对应流向
        public void GetLXData(ComboBox cb, string PointMZID, string PointPZID)
        {
            CoreClientParam ccp = new CoreClientParam();

            ccp.ServerName   = "ygjzjl.basedatamanage.GetBaseInfo";
            ccp.MethodName   = "QueryLXIDData";
            ccp.ServerParams = new object[] { PointMZID, PointPZID };

            System.Data.DataTable dtLX = new System.Data.DataTable();

            ccp.SourceDataTable = dtLX;
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);

            if (dtLX.Rows.Count > 0)
            {
                DataRow dr = dtLX.NewRow();
                dtLX.Rows.InsertAt(dr, 0);

                cb.DataSource    = dtLX;
                cb.DisplayMember = "FS_TYPENAME";
                cb.ValueMember   = "FS_FLOW";

                cb.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
                cb.AutoCompleteSource = AutoCompleteSource.ListItems;
            }
            else
            {
                cb.DataSource = dtLX;
            }
        }
Пример #3
0
        //从数据库获取磅房对应表面级别
        public void GetBMJBData(ComboBox cb, string PointID)
        {
            CoreClientParam ccp = new CoreClientParam();
            ccp.ServerName = "ygjzjl.basedatamanage.QueryPointInfo";
            ccp.MethodName = "QueryBMJBData";
            ccp.ServerParams = new object[] { PointID };

            System.Data.DataTable dt = new System.Data.DataTable();

            ccp.SourceDataTable = dt;
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);

            if (dt.Rows.Count > 0)
            {
                DataRow dr = dt.NewRow();
                dt.Rows.InsertAt(dr, 0);

                cb.DataSource = dt;
                cb.DisplayMember = "FS_FACELEVEL";
                cb.ValueMember = "FS_FACELEVEL";

                cb.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
                cb.AutoCompleteSource = AutoCompleteSource.ListItems;
            }
            else
            {
                cb.DataSource = dt;
            }
        }
        /// <summary>
        /// 查询轧制批号是否在表面质量检验表
        /// </summary>
        /// <returns></returns>
        private int checkIsExist()
        {
            DataTable       dt     = new DataTable();
            string          strSql = "select  t.fs_batchno from dt_zkd_qm_batchnoinfo t where t.fs_batchno = '" + this.ugcpFS_BATCHNO.Text + "' and t.fn_bandno = '" + this.ugcpFN_BANDNO.Text + "'";
            CoreClientParam ccp    = new CoreClientParam();

            ccp.ServerName = "ygjzjl.base.QueryData";
            ccp.MethodName = "queryByClientSql";

            ccp.ServerParams    = new object[] { strSql };
            ccp.SourceDataTable = dt;
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
            if (ccp.ReturnCode == 0)
            {
                if (dt.Rows.Count > 0)
                {
                    return(1);
                }
                else
                {
                    return(0);
                }
            }
            else
            {
                return(-1);
            }
        }
Пример #5
0
        //从数据库中获取磅房对应供应单位
        public void GetFHDWData(ComboBox cb, string PointID)
        {
            CoreClientParam ccp = new CoreClientParam();

            ccp.ServerName   = "ygjzjl.basedatamanage.QueryPointInfo";
            ccp.MethodName   = "QuerySCDWData";
            ccp.ServerParams = new object[] { PointID };

            System.Data.DataTable dtFHDW = new System.Data.DataTable();

            ccp.SourceDataTable = dtFHDW;
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);

            if (dtFHDW.Rows.Count > 0)
            {
                DataRow dr = dtFHDW.NewRow();
                dtFHDW.Rows.InsertAt(dr, 0);

                cb.DataSource    = dtFHDW;
                cb.DisplayMember = "FS_MEMO";
                cb.ValueMember   = "FS_SENDER";

                cb.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
                cb.AutoCompleteSource = AutoCompleteSource.ListItems;
            }
            else
            {
                cb.DataSource = dtFHDW;
            }
        }
Пример #6
0
        private void GetDataName()
        {
            string          sql = "select fs_weighttype from DT_OPERATIONLOG GROUP BY fs_weighttype";//A.FS_POINTNO ='K02' and
            CoreClientParam ccp = new CoreClientParam();

            //ccp.ServerName = "kiscicplat.dhs.carweight.CarWeightPrediction";
            //ccp.MethodName = "QueryFHDWData";
            //ccp.ServerParams = new object[] { strBFID };
            ccp.ServerName   = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName   = "ExcuteQuery";
            ccp.ServerParams = new object[] { sql };
            System.Data.DataTable dtBF = new System.Data.DataTable();
            ccp.SourceDataTable = dtBF;
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);

            if (dtBF.Rows.Count > 0)
            {
                DataRow dr = dtBF.NewRow();
                dtBF.Rows.InsertAt(dr, 0);

                this.cbBF.DataSource = dtBF;
                cbBF.DisplayMember   = "fs_weighttype";
                cbBF.ValueMember     = "fs_weighttype";

                cbBF.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
                cbBF.AutoCompleteSource = AutoCompleteSource.ListItems;
            }
            else
            {
                cbBF.DataSource = dtBF;
            }
        }
Пример #7
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (ultraGrid1.ActiveRow == null)
            {
                MessageBox.Show("请先选择做预报记录!");
            }
            else
            {
                string strResult = Check();

                if (strResult != string.Empty)
                {
                    MessageBox.Show(strResult);
                    return;
                }

                Hashtable param = new Hashtable();
                param.Add("I1", txtBatchNo.Text);
                param.Add("I2", txtStoveNo.Text);
                param.Add("I3", txtSteelType.Text);
                param.Add("I4", txtSpec.Text);
                param.Add("I5", cbPointID.SelectedValue.ToString());
                param.Add("I6", txtReel.Text);
                param.Add("I7", cbBilletStatus.SelectedValue.ToString());
                param.Add("I8", txtProductNo.Text);
                param.Add("I9", this.UserInfo.GetUserName().ToString());
                param.Add("I10", this.UserInfo.GetUserOrder().ToString());
                param.Add("I11", this.UserInfo.GetUserGroup().ToString());
                CoreClientParam ccp = this.excuteProcedure2("{call KG_MCMS_ZKDINFO.ADD_ZKD_PLAN(?,?,?,?,?,?,?,?,?,?,?)}", param);
                this.GetFlowCardInfo("");
            }
        }
Пример #8
0
        /// <summary>
        /// 获取计量点信息
        /// </summary>
        /// <param name="pointType">计量点类型</param>
        /// <returns>计量点数组</returns>
        public BT_POINT[] GetPoints(string pointType)
        {
            BT_POINT[] points = null;
            DataTable dt = new DataTable();
            ArrayList param = new ArrayList();
            param.Add(pointType);
            CoreClientParam ccp = new CoreClientParam();
            ccp.ServerName = "com.dbComm.DBComm";
            ccp.MethodName = "query";
            ccp.ServerParams = new object[] { "WEIGHPOINT_02.SELECT", param };
            ccp.SourceDataTable = dt;
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
            if (dt.Rows.Count > 0)
            {
                points = new BT_POINT[dt.Rows.Count];
                BT_POINT point = null;
                DataRow dr = null;
                for (int i = 0;i < dt.Rows.Count;i++)
                {
                    dr = dt.Rows[i];
                    points[i] = ConvertDataRowToPointObject(dr);
                }

            }
            return points;
        }
Пример #9
0
        private bool CheckSteelTypeIsExist(string strSteelType)
        {
            try
            {
                string sql = "select fn_id,fs_SteelType,fs_Standard from BT_PRINTCARDSTANDARD where fs_steeltype = '" + strSteelType + "'";

                CoreClientParam ccp = new CoreClientParam();
                ccp.ServerName   = "hgjzjl.highspeedwire.HighSpeedWireInfo";
                ccp.MethodName   = "QueryTableData";
                ccp.ServerParams = new object[] { sql };

                DataTable dt_temp = new DataTable();
                ccp.SourceDataTable = dt_temp;
                this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
                if (dt_temp.Rows.Count > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.Message);
                return(false);
            }
        }
Пример #10
0
        //下载流向信息  ,add by luobin
        private void DownLoadFlow()
        {
            DataTable  m_FlowTable = new DataTable();//流向数据表
            DataColumn dc;

            dc = new DataColumn("FS_TYPECODE".ToUpper()); m_FlowTable.Columns.Add(dc);
            dc = new DataColumn("FS_TYPENAME".ToUpper()); m_FlowTable.Columns.Add(dc);

            string sql = "select FS_TYPECODE, FS_TYPENAME From BT_WEIGHTTYPE order by FS_TYPECODE ";

            CoreClientParam ccp = new CoreClientParam();

            ccp.ServerName      = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName      = "ExcuteQuery";
            ccp.ServerParams    = new object[] { sql };
            ccp.SourceDataTable = m_FlowTable;

            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);

            DataRow dr = m_FlowTable.NewRow();

            dr["FS_TYPECODE"] = "";
            dr["FS_TYPENAME"] = "";
            m_FlowTable.Rows.InsertAt(dr, 0);

            cbFlow.DataSource    = m_FlowTable;
            cbFlow.DisplayMember = "FS_TYPENAME";
            cbFlow.ValueMember   = "FS_TYPECODE";
        }
Пример #11
0
        //从数据库获取磅房对应物料
        public void GetWLData(ComboBox cb, string PointID)
        {
            try
            {
                CoreClientParam ccp = new CoreClientParam();
                ccp.ServerName   = "ygjzjl.basedatamanage.QueryPointInfo";
                ccp.MethodName   = "QueryWLData";
                ccp.ServerParams = new object[] { PointID };

                System.Data.DataTable dtWL = new System.Data.DataTable();

                ccp.SourceDataTable = dtWL;
                this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);

                if (dtWL.Rows.Count > 0)
                {
                    DataRow dr = dtWL.NewRow();
                    dtWL.Rows.InsertAt(dr, 0);

                    cb.DataSource    = dtWL;
                    cb.DisplayMember = "FS_MATERIALNAME";
                    cb.ValueMember   = "FS_MATERIALNO";

                    cb.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
                    cb.AutoCompleteSource = AutoCompleteSource.ListItems;
                }
                else
                {
                    cb.DataSource = dtWL;
                }
            }
            catch (Exception e)
            {
            }
        }
Пример #12
0
        private void AddRecord()
        {
            if (!checkItems())
            {
                return;
            }
            string strGrossPoint  = "K38";
            string strTarePoint   = "K38";
            string strweightno    = Guid.NewGuid().ToString();
            string strStoveSeatNo = (ultraOptionSet1.CheckedIndex + 1).ToString();
            string strStoveNo     = txtStoveNo1.Text.Trim().Replace("'", "''");
            string strPotNo       = txtPotNo.Text.Trim().Replace("'", "''");
            string strGrossWeight = txtGrossWeight.Text.Trim().Replace("'", "''");
            string strTearWeight  = txtTearWeight.Text.Trim().Replace("'", "''");
            string strNetWeight   = txtNetWeight.Text.Trim().Replace("'", "''");
            string strReceiveFac  = (ultraOptionSet2.CheckedIndex + 1).ToString();
            //string strAddRecorder = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            string    strAddRecorder = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName() + "手动新增";
            string    strShift       = Table_CA02_UserOrder.Static_T_CA02_UserOrder.GetUserOrderName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserOrder()).ToString(); //班次
            string    strGroup       = Table_CA02_UserGroup.Static_T_CA02_UserGroup.GetUserGroupName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserGroup()).ToString(); //班组
            ArrayList list           = new ArrayList();

            list.Add(strStoveSeatNo);
            list.Add(strStoveNo);
            list.Add(strPotNo);
            list.Add(strGrossWeight);
            list.Add(strTearWeight);
            list.Add(strNetWeight);
            list.Add(strReceiveFac);
            list.Add(strAddRecorder);
            list.Add(strAddRecorder);
            list.Add(strShift);

            CoreClientParam ccp = new CoreClientParam();

            ccp.ServerName = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName = "ExcuteNonQuery";

            string sql = " INSERT INTO DT_STATICTRACKWEIGHT_WEIGHT (FS_WEIGHTNO,FS_STOVESEATNO,FS_STOVENO,FS_POTNO,"
                         + "FN_GROSSWEIGHT,FN_TAREWEIGHT,FN_NETWEIGHT,FS_WEIGHTTYPE,FS_GROSSPERSON,"
                         + "FS_TAREPERSON,FD_GROSSTIME,FD_TARETIME,FS_GROSSSHIFT,FS_GROSSGROUP,FS_TARESHIFT,FS_TAREGROUP,FS_GROSSPOINT,FS_TAREPOINT) VALUES ('"
                         + strweightno + " ','" + strStoveSeatNo + "','" + strStoveNo + "','" + strPotNo + "','" +
                         strGrossWeight + "','" + strTearWeight + "','" + strNetWeight + "','" + strReceiveFac + "','" +
                         strAddRecorder + "','" + strAddRecorder + "',sysdate,sysdate,'" + strShift + "','" + strGroup + "','" + strShift + "','" + strGroup + "','" + strGrossPoint + "','" + strTarePoint + "')";

            ccp.ServerParams = new object[] { sql };
            this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
            if (ccp.ReturnCode == 0)
            {
                MessageBox.Show("新增记录成功!");
                string strLog = "罐号=" + strPotNo + ",炉座号="                                                                                            //卡号、车号
                                + strStoveSeatNo + ",炉号=" + strStoveNo + ",毛重="                                                                       //物料、发货单位
                                + strGrossWeight + ",皮重=" + strTearWeight + ",净重="                                                                    //卸货地点、承运单位
                                + strNetWeight + ",流向=" + strReceiveFac + ",";
                this.objBi.WriteOperationLog("DT_STATICTRACKWEIGHT_WEIGHT", strDepartMent, strUserName, "增加", strLog, "数据修改", "静态铁水衡二次数据表", "静态铁水衡"); //调用写操作日志方法
            }


            QueryData();
        }
Пример #13
0
        private void Update()
        {
            if (IsValid() == false)
            {
                return;
            }
            m_SelectPointID = this.cbBF.SelectedValue.ToString();


            string strCarNo      = this.tbCarNo.Text.Trim();
            string strCardNo     = this.tbCardNo.Text.Trim();
            string strTareWeight = this.tbWeight.Text.Trim();

            string sql = "update dt_termTare SET FS_CARDNUMBER = '" + strCardNo + "',";

            sql += " FS_CARNO = '" + strCarNo + "',";
            sql += " FN_TAREWEIGHT = '" + strTareWeight + "' ";
            sql += " where FS_WEIGHTNO = '" + m_WeightNo + "'";

            CoreClientParam ccp = new CoreClientParam();

            ccp.ServerName   = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName   = "updateByClientSql";
            ccp.ServerParams = new object[] { sql };
            ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
        }
Пример #14
0
        private void DoUpdate()
        {
            if (DoCheck())
            {
                string p_OldShift  = "";
                string p_Shift     = tbShift.Text.Trim();
                string p_StartTime = dateTimePicker1.Value.ToString("HH:mm:ss");
                string p_EndTime   = dateTimePicker2.Value.ToString("HH:mm:ss");

                UltraGridRow ugr = this.ultraGrid1.ActiveRow;
                if (ugr == null)
                {
                    p_OldShift = p_Shift;
                }
                else
                {
                    p_OldShift = ugr.Cells["FS_SHIFTNAME"].Text.Trim();
                }


                CoreClientParam ccp = new CoreClientParam();
                ccp.ServerName   = "ygjzjl.basedatamanage.ShiftBaseInfo";
                ccp.MethodName   = "update";
                ccp.ServerParams = new object[] { p_OldShift, p_Shift, p_StartTime, p_EndTime };
                this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
                this.DoClear();
                this.DoQuery();
            }
        }
Пример #15
0
        private void showMxsj(string sLh)
        {
            string          strTmpTable, strTmpField, strTmpWhere, strTmpOrder;
            CoreClientParam ccpOrderInfo = new CoreClientParam();

            ccpOrderInfo.ServerName = "ygjzjl.base.QueryData";
            ccpOrderInfo.MethodName = "queryData";

            strTmpTable = "DT_PRODUCTWEIGHTDETAIL";
            strTmpField = "FS_BATCHNO,FN_BANDNO,FS_TYPE,FN_LENGTH,FN_WEIGHT,FN_BANDBILLETCOUNT,FD_DATETIME,FN_THEORYWEIGHT";
            strTmpWhere = " AND FS_BATCHNO = '" + sLh + "' and FS_UPLOADFLAG='1'";
            strTmpOrder = " ORDER BY FS_BATCHNO,FN_BANDNO";
            System.Data.DataTable dtTmpData = new System.Data.DataTable();

            dataSet1.Tables[2].Clear();
            ccpOrderInfo.ServerParams    = new object[] { strTmpTable, strTmpField, strTmpWhere, strTmpOrder };
            ccpOrderInfo.SourceDataTable = dataSet1.Tables[2];
            this.ExecuteQueryToDataTable(ccpOrderInfo, CoreInvokeType.Internal);
            //string strTmp = "明细数据:";
            //if (dtTmpData.Rows.Count > 0)
            //{
            //    for (int i = 0; i < dtTmpData.Rows.Count - 1; i++)
            //    {
            //        strTmp += " | " + dtTmpData.Rows[i]["FS_BATCHNO"].ToString();
            //        strTmp += "  " + dtTmpData.Rows[i]["FN_BANDNO"].ToString();
            //        strTmp += "  " + dtTmpData.Rows[i]["FS_TYPE"].ToString();
            //        strTmp += "  " + dtTmpData.Rows[i]["FN_WEIGHT"].ToString();
            //    }
            //    rtxtHint1.Text += strTmp + "\n";
            //}
        }
Пример #16
0
        private void QueryLog()
        {
            //if (!limitQueryTime.ParseTimeLegal(BeginTime.Value, EndTime.Value))
            //{
            //    return;
            //}

            string strBeginTime = BeginTime.Value.ToString("yyyy-MM-dd 00:00:00");
            string strEndTime   = EndTime.Value.ToString("yyyy-MM-dd 23:59:59");

            string strQuerySql = "select  FS_OPERATIONNO,FS_TABLENAME,FS_DEPART,FS_TYPE,to_char(FD_TIME,'yyyy-MM-dd hh24:mi:ss') as FD_TIME ,FS_OPERATOR,FS_DATA,FS_IP,FS_GRAPHNAME,FS_DATANAME,FS_WEIGHTTYPE from DT_OPERATIONLOG t ";

            strQuerySql += " where t.fd_time between to_date('" + strBeginTime + "', 'yyyy-MM-dd hh24:mi:ss') and to_date('" + strEndTime + "', 'yyyy-MM-dd hh24:mi:ss') ";

            if (this.cbBF.SelectedValue != null && this.cbBF.SelectedValue.ToString() != "")
            {
                strQuerySql += " and t.fs_weighttype='" + this.cbBF.SelectedValue.ToString() + "'";
            }
            strQuerySql += "ORDER BY FD_TIME DESC";
            CoreClientParam ccp = new CoreClientParam();

            ccp.ServerName   = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName   = "ExcuteQuery";
            ccp.ServerParams = new object[] { strQuerySql };

            ccp.SourceDataTable = this.dataSet1.Tables[1];
            this.dataSet1.Tables[1].Clear();
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
        }
Пример #17
0
        private bool CheckIsExist(string strBatchNo)
        {
            try
            {
                string strSql = "select * from DT_STEELWEIGHTMAIN where fs_stoveno = '" + strBatchNo + "'";

                CoreClientParam ccp = new CoreClientParam();
                ccp.ServerName   = "ygjzjl.basedatamanage.OtherBaseInfo";
                ccp.MethodName   = "ExcuteQuery";
                ccp.ServerParams = new object[] { strSql };
                DataTable dt_temp = new DataTable();
                ccp.SourceDataTable = dt_temp;
                this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
                if (dt_temp.Rows.Count > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.Message);
                return(false);
            }
        }
Пример #18
0
        /// <summary>
        /// 从数据库获取发货单位数据(DHS项目实施后要做相应修改,供应商改为发货单位)
        /// </summary>
        private void GetFHDWData()                                                                           //客户端加参数,调用kiscicplat.common.QueryByClient
        {
            string          sql = "select FS_POINTCODE ,FS_POINTNAME from bt_point where FS_POINTTYPE='QC'"; //A.FS_POINTNO ='K02' and
            CoreClientParam ccp = new CoreClientParam();

            //ccp.ServerName = "kiscicplat.dhs.carweight.CarWeightPrediction";
            //ccp.MethodName = "QueryFHDWData";
            //ccp.ServerParams = new object[] { strBFID };
            ccp.ServerName   = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName   = "ExcuteQuery";
            ccp.ServerParams = new object[] { sql };
            System.Data.DataTable dtBF = new System.Data.DataTable();
            ccp.SourceDataTable = dtBF;
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);

            if (dtBF.Rows.Count > 0)
            {
                DataRow dr = dtBF.NewRow();
                dtBF.Rows.InsertAt(dr, 0);

                this.cbBF.DataSource = dtBF;
                cbBF.DisplayMember   = "FS_POINTNAME";
                cbBF.ValueMember     = "FS_POINTCODE";

                cbBF.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
                cbBF.AutoCompleteSource = AutoCompleteSource.ListItems;
            }
            else
            {
                cbBF.DataSource = dtBF;
            }
        }
Пример #19
0
        /// <summary>
        /// 根据物料号获取物料名称信息
        /// </summary>
        public string getMaterialName(string sMaterial)
        {
            if (sMaterial == "")
            {
                return("");
            }

            string          strTmpTable, strTmpField, strTmpWhere;
            CoreClientParam ccpData = new CoreClientParam();

            ccpData.ServerName = "ygjzjl.base.QueryData";
            ccpData.MethodName = "queryData";

            strTmpTable = "IT_MATERIAL";
            strTmpField = "FS_MATERIALNAME";
            strTmpWhere = " AND FS_SAPCODE='" + sMaterial + "'";

            System.Data.DataTable dtTmpData = new System.Data.DataTable();

            ccpData.ServerParams = new object[] { strTmpTable, strTmpField, strTmpWhere, "" }; //
            dtTmpData.Clear();
            ccpData.SourceDataTable = dtTmpData;
            this.ExecuteQueryToDataTable(ccpData, CoreInvokeType.Internal);
            if (dtTmpData.Rows.Count > 0)
            {
                return(dtTmpData.Rows[0]["FS_MATERIALNAME"].ToString());
            }
            else
            {
                return("");
            }
        }
Пример #20
0
        private int getBilletCountByStoveNo(string strStoveNo)
        {
            string          strSql = "select FN_BILLETCOUNT from dt_steelweightmain where FS_STOVENO='" + strStoveNo + "'";
            DataTable       dt     = new DataTable();
            CoreClientParam ccp    = new CoreClientParam();

            ccp.ServerName      = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName      = "ExcuteQuery";
            ccp.ServerParams    = new object[] { strSql };
            ccp.SourceDataTable = dt;
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);

            if (dt.Rows.Count > 0)
            {
                try
                {
                    return(Convert.ToInt16(dt.Rows[0]["FN_BILLETCOUNT"].ToString()));
                }
                catch
                {
                    return(0);
                }
            }
            else
            {
                return(0);
            }
        }
Пример #21
0
        //本地SAP系统部署
        //    private SAPLogonControlClass connctl = new SAPLogonControlClass();
        //  private Connection conn;

        #endregion

        #region 数据信息检查

        /// <summary>
        /// 查询数据是否存在,返回布尔
        /// </summary>
        /// <param name="sField">字段</param>
        /// <param name="sTable">数据库表</param>
        /// <param name="sWhere">查询条件</param>
        /// <returns></returns>
        public bool chkBatchDataExist(string sField, string sTable, string sWhere)
        {
            string          strTmpOrder;
            CoreClientParam ccpData = new CoreClientParam();

            ccpData.ServerName = "ygjzjl.base.QueryData";
            ccpData.MethodName = "queryData";

            strTmpOrder = "";

            System.Data.DataTable dtTmpData = new System.Data.DataTable();

            ccpData.ServerParams = new object[] { sTable, sField, sWhere, strTmpOrder }; //
            dtTmpData.Clear();
            ccpData.SourceDataTable = dtTmpData;
            this.ExecuteQueryToDataTable(ccpData, CoreInvokeType.Internal);
            if (dtTmpData.Rows.Count > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #22
0
        /// <summary>
        /// 显示方坯信息
        /// </summary>
        private void showGridInfo()
        {
            string          strTmpTable, strTmpField, strTmpOrder;
            CoreClientParam ccpData = new CoreClientParam();

            ccpData.ServerName = "ygjzjl.base.QueryData";
            ccpData.MethodName = "queryData";

            strTmpTable = "";
            strTmpField = "";
            strTmpOrder = "";

            strTmpTable = "DT_PRODUCTWEIGHTMAIN t";
            strTmpField = "TO_CHAR(t.FD_ENDTIME,'yyyy-MM-dd HH24:mi:ss') AS GBSJ,t.FS_BATCHNO,t.FS_PRODUCTNO,"
                          + "t.FS_ITEMNO,t.FS_SAPSTORE,t.FS_AUDITOR,t.FD_AUDITTIME,t.FS_ISMATCH,t.FS_UPLOADFLAG,"
                          + "t.FS_ACCOUNTDATE,t.FS_STEELTYPE,t.FS_SPEC,t.FS_HEADER,";
            strTmpField += " (select sum( r.FN_WEIGHT) from DT_PRODUCTWEIGHTDETAIL r where r.FS_BATCHNO=t.FS_BATCHNO and r.FS_UPLOADFLAG='1') as  FN_TOTALWEIGHT,";
            strTmpField += "(select sum( r.FN_THEORYWEIGHT) from DT_PRODUCTWEIGHTDETAIL r where r.FS_BATCHNO=t.FS_BATCHNO and r.FS_UPLOADFLAG='1')  as FN_THEORYTOTALWEIGHT";

            strTmpOrder = " ORDER BY FD_ENDTIME";

            ccpData.ServerParams = new object[] { strTmpTable, strTmpField, strWhere, strTmpOrder }; //

            dataSet1.Tables[0].Clear();
            ccpData.SourceDataTable = dataSet1.Tables[0];
            try
            {
                this.ExecuteQueryToDataTable(ccpData, CoreInvokeType.Internal);
            }
            catch (Exception)
            {
                MessageBox.Show("信息查询异常!");
            }
        }
Пример #23
0
        private void btnDel_Click(object sender, EventArgs e)
        {
            if (!chkSelectData())
            {
                return;
            }

            string strTmpTable, strTmpWhere;

            lstHint1.Items.Clear();

            strTmpTable = "DT_SAP261";
            strTmpWhere = getSelectNo();
            CoreClientParam ccpDel = new CoreClientParam();

            ccpDel.ServerName = "ygjzjl.base.QueryData";
            ccpDel.MethodName = "DeleteData";

            ccpDel.ServerParams = new object[] { strTmpTable, strTmpWhere };

            this.ExecuteNonQuery(ccpDel, CoreInvokeType.Internal);
            if (ccpDel.ReturnCode == 0)
            {
                lstHint1.Items.Add("信息删除成功!");
            }
            else
            {
                lstHint1.Items.Add("信息删除失败!");
            }
            showGridInfo();
        }
Пример #24
0
        /// <summary>
        /// 获取计量点信息
        /// </summary>
        /// <param name="pointType">计量点类型</param>
        /// <returns>计量点数组</returns>
        public BT_POINT[] GetPoints(string pointType)
        {
            BT_POINT[] points = null;
            DataTable  dt     = new DataTable();
            ArrayList  param  = new ArrayList();

            param.Add(pointType);
            CoreClientParam ccp = new CoreClientParam();

            ccp.ServerName      = "com.dbComm.DBComm";
            ccp.MethodName      = "query";
            ccp.ServerParams    = new object[] { "WEIGHPOINT_02.SELECT", param };
            ccp.SourceDataTable = dt;
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
            if (dt.Rows.Count > 0)
            {
                points = new BT_POINT[dt.Rows.Count];
                BT_POINT point = null;
                DataRow  dr    = null;
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    dr        = dt.Rows[i];
                    points[i] = ConvertDataRowToPointObject(dr);
                }
            }
            return(points);
        }
Пример #25
0
        /// <summary>
        /// 获取计量点设备信息
        /// </summary>
        /// <param name="cabinetCode">计量点编号</param>
        /// <returns>计量点设备组</returns>
        public BTDevice[] GetDevice(string cabinetCode)
        {
            BTDevice [] devices = null;
            DataTable   dt      = new DataTable();
            ArrayList   param   = new ArrayList();

            param.Add(cabinetCode);
            CoreClientParam ccp = new CoreClientParam();

            ccp.ServerName      = "com.dbComm.DBComm";
            ccp.MethodName      = "query";
            ccp.ServerParams    = new object[] { "WEIGHDEVICE_01.SELECT", param };
            ccp.SourceDataTable = dt;
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
            if (dt.Rows.Count > 0)
            {
                devices = new BTDevice[dt.Rows.Count];
                DataRow dr = null;
                for (int i = 0; i < devices.Length; i++)
                {
                    dr         = dt.Rows[i];
                    devices[i] = ConvertDataRowToDeviceObject(dr);
                }
            }
            return(devices);
        }
Пример #26
0
        /// <summary>
        /// 显示方坯信息
        /// </summary>
        private void showGridInfo()
        {
            string          strTmpTable, strTmpField, strTmpOrder;
            CoreClientParam ccpData = new CoreClientParam();

            ccpData.ServerName = "ygjzjl.base.QueryData";
            ccpData.MethodName = "queryData";

            strTmpTable = "DT_CARWEIGHT_WEIGHT";
            strTmpField = "TO_CHAR(FD_GROSSDATETIME,'yyyy-MM-dd HH24:mi:ss') AS GBSJ,FS_STOVENO,FS_PRODUCTNO,"
                          + "FS_ITEMNO,FS_PLANT,FS_SAPSTORE,FS_UPLOADFLAG,FN_NETWEIGHT,FS_ACCOUNTDATE, FN_COUNT as FN_BILLETCOUNT,FS_MATERIALNAME";
            strTmpOrder = " ORDER BY FD_GROSSDATETIME";

            ccpData.ServerParams = new object[] { strTmpTable, strTmpField, strWhere, strTmpOrder }; //

            dataSet1.Tables[0].Clear();
            ccpData.SourceDataTable = dataSet1.Tables[0];
            try
            {
                this.ExecuteQueryToDataTable(ccpData, CoreInvokeType.Internal);
            }
            catch (Exception ex1)
            {
                MessageBox.Show("信息查询异常!");
            }
        }
Пример #27
0
        private void btnDel_Click(object sender, EventArgs e)
        {
            if (!chkSelectData()) return;

            string strTmpTable, strTmpWhere;
            lstHint1.Items.Clear();

            strTmpTable = "DT_SAP261";
            strTmpWhere = getSelectNo();
            CoreClientParam ccpDel = new CoreClientParam();
            ccpDel.ServerName = "ygjzjl.base.QueryData";
            ccpDel.MethodName = "DeleteData";

            ccpDel.ServerParams = new object[] { strTmpTable, strTmpWhere };

            this.ExecuteNonQuery(ccpDel, CoreInvokeType.Internal);
            if (ccpDel.ReturnCode == 0)
            {
                lstHint1.Items.Add("信息删除成功!");
            }
            else
            {
                lstHint1.Items.Add("信息删除失败!");
            }
            showGridInfo();
        }
Пример #28
0
        private void DoUpdate()
        {
            if (strNumber == "")
            {
                MessageBox.Show("请先选择需要修改的记录");
                return;
            }

            //string strDeviceNo = this.tbDeviceNo.Text.Trim();
            //string strCompareDate = this.dtCompareDate.Text.Trim(); ;//this.dtCompareDate.Value.ToString("yyyy-MM-dd HH:mm:ss");
            //string strSpecType = this.tbSpecType.Text.Trim();
            //string strAllowDiff = this.tbAllowDiff.Text.Trim();
            //string strWeight = this.tbWeight.Text.Trim();
            //string strShowWeight =  this.tbShowWeight.Text.Trim();
            //string strDiffWeight = this.tbDiffWeight.Text.Trim();
            //string strJudgeResult = this.tbJudgeResult.Text.Trim();
            //string strOperator = this.tbOperator.Text.Trim();
            //string strShift = this.tbShift.Text.Trim();
            //string strTerm = this.tbTerm.Text.Trim();
            string strMemo = this.tbMemo.Text.Trim();
            //string strDeviceNumber = this.tbDeviceNumber.Text.Trim();

            //string sql = "update DT_CORRENTION_DETAIL set FS_DEVICENO = '" + strDeviceNo + "',FD_COMPAREDATE = to_Date('" + strCompareDate + "','yyyy-MM-dd hh24:mi:ss'),";
            //sql += " FS_SPECTYPE = '" + strSpecType + "',FN_ALLOWDIFF='" + strAllowDiff + "',FN_WEIGHT = '" + strWeight + "',FN_SHOWWEIGHT = '"+strShowWeight+"',";
            //sql += " FN_DIFFWEIGHT = '" + strDiffWeight + "',FS_JUDGERESULT = '" + strJudgeResult + "',FS_OPERATOR = '" + strOperator + "',FS_SHIFT = '" + strShift + "',";
            //sql += " FS_TERM = '" + strTerm + "',FS_MEMO = '" + strMemo + "' where FS_WEIGHTNO = '" + strNumber + "'";
            string          sql = "update DT_CORRENTION_DETAIL set FS_MEMO = '" + strMemo + "' where FS_WEIGHTNO = '" + strNumber + "'";
            CoreClientParam ccp = new CoreClientParam();

            ccp.ServerName   = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName   = "ExcuteNonQuery";
            ccp.ServerParams = new object[] { sql };
            ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
        }
Пример #29
0
        private void DoAdd()
        {
            string strDeviceNo    = this.tbDeviceNo.Text.Trim();
            string strCompareDate = ""; //this.dtCompareDate.Value.ToString("yyyy-MM-dd HH:mm:ss");
            string strSpecType    = this.tbSpecType.Text.Trim();
            string strAllowDiff   = this.tbAllowDiff.Text.Trim();
            string strWeight      = this.tbWeight.Text.Trim();
            string strShowWeight  = this.tbShowWeight.Text.Trim();
            string strDiffWeight  = this.tbDiffWeight.Text.Trim();
            string strJudgeResult = this.tbJudgeResult.Text.Trim();
            string strOperator    = this.tbOperator.Text.Trim();
            string strShift       = this.tbShift.Text.Trim();
            string strTerm        = this.tbTerm.Text.Trim();
            string strMemo        = this.tbMemo.Text.Trim();
            string strGuid        = Guid.NewGuid().ToString();

            string sql = "insert into DT_COMPAREBALANCE (FS_DEVICENO,FD_COMPAREDATE,FS_SPECTYPE,FS_NUMBER,FN_ALLOWDIFF,";

            sql += "FN_WEIGHT,FN_SHOWWEIGHT,FN_DIFFWEIGHT,FS_JUDGERESULT,FS_OPERATOR,FS_SHIFT,FS_TERM,FS_MEMO) values(";
            sql += "'" + strDeviceNo + "',to_date('" + strCompareDate + "','yyyy-MM-dd hh24:mi:ss'),'" + strSpecType + "',";
            sql += "'" + strGuid + "','" + strAllowDiff + "','" + strWeight + "','" + strShowWeight + "','" + strDiffWeight + "',";
            sql += "'" + strJudgeResult + "','" + strOperator + "','" + strShift + "','" + strTerm + "','" + strMemo + "')";

            CoreClientParam ccp = new CoreClientParam();

            ccp.ServerName   = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName   = "ExcuteNonQuery";
            ccp.ServerParams = new object[] { sql };
            ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
        }
Пример #30
0
        /// <summary>
        /// 显示方坯信息
        /// </summary>
        private void showGridInfo()
        {
            string          strTmpTable, strTmpField, strTmpOrder;
            CoreClientParam ccpData = new CoreClientParam();

            ccpData.ServerName = "ygjzjl.base.QueryData";
            ccpData.MethodName = "queryData";

            // String FN_NETWEIGHT = "";
            strTmpTable  = "DT_SteelWeightMain t";
            strTmpField  = "TO_CHAR(t.FD_STARTTIME,'yyyy-MM-dd HH24:mi:ss') AS GBSJ,t.FS_STOVENO,t.FS_PRODUCTNO,t.FS_ACCOUNTDATE,t.FS_MATERIALNAME,t.FS_STEELTYPE,t.FS_SPEC,t.FS_AUDITOR,t.FS_ITEMNO,t.FS_PLANT,t.FS_SAPSTORE,t.FS_UPLOADFLAG,t.FS_ISMATCH,";
            strTmpField += " (select count( r.fs_weightno) from dt_steelweightdetailroll r where r.fs_stoveno=t.fs_stoveno) as  FN_BILLETCOUNT ,";
            strTmpField += "(select  cast( sum( r.fn_netweight) as decimal(38,3)) from dt_steelweightdetailroll r where r.fs_stoveno=t.fs_stoveno)  as FN_NETWEIGHT";

            strTmpOrder = " ORDER BY t.FD_STARTTIME";


            ccpData.ServerParams = new object[] { strTmpTable, strTmpField, strWhere, strTmpOrder }; //
            dataSet1.Tables[0].Clear();
            ccpData.SourceDataTable = dataSet1.Tables[0];
            try
            {
                this.ExecuteQueryToDataTable(ccpData, CoreInvokeType.Internal);
                //Constant.RefreshAndAutoSize(uGridData);
            }
            catch (Exception ex1)
            {
                lstHint2.Items.Add("信息查询异常!");
            }
        }
Пример #31
0
        /// <summary>
        /// 计量点查询
        /// </summary>
        private void PointQuery()
        {
            string strSQL = "select 'False' XZ,t.FS_POINTCODE,t.FS_POINTNAME,decode(t.FN_POINTFLAG,0,'未接管',1,'已接管') FN_POINTFLAG,t.FS_IP";
            strSQL += " from bt_pointflag t";
            CoreClientParam ccp = new CoreClientParam();
            this.dataTable1.Rows.Clear();
            ccp.ServerName = "ygjzjl.car.CarCard";
            ccp.MethodName = "queryByClientSql";
            ccp.ServerParams = new object[] { strSQL };
            ccp.SourceDataTable = dataTable1;
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);

            try
            {

                foreach (UltraGridRow ugr in ultraGrid1.Rows)
                {
                    if (ugr.Cells["FN_POINTFLAG"].Text.ToString() == "已接管")
                    {
                        ugr.Appearance.ForeColor = Color.Red;
                    }
                }

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Пример #32
0
        /// <summary>
        /// 显示板坯信息
        /// </summary>
        private void showGridInfo()
        {
            string          strTmpTable, strTmpField, strTmpOrder;
            CoreClientParam ccpData = new CoreClientParam();

            ccpData.ServerName = "ygjzjl.base.QueryData";
            ccpData.MethodName = "queryData";

            strTmpTable = "DT_SAP261";
            strTmpField = "FS_WEIGHTNO,FN_NETWEIGHT,FS_STOVENO,FS_UPLOADFLAG,FS_AUDITOR,FS_HEADER,FS_PRODUCTNO,"
                          + "FS_PLANT,FS_SAPSTORE,FS_ACCOUNTDATE,FS_MATERIAL,FS_MATERIALNAME";
            strTmpOrder = " ORDER BY FS_STOVENO";


            ccpData.ServerParams = new object[] { strTmpTable, strTmpField, strWhere, strTmpOrder }; //
            dataSet1.Tables[0].Clear();
            ccpData.SourceDataTable = dataSet1.Tables[0];
            try
            {
                this.ExecuteQueryToDataTable(ccpData, CoreInvokeType.Internal);
                //Constant.RefreshAndAutoSize(uGridData);
            }
            catch (Exception ex1)
            {
                lstHint2.Items.Add(ex1.Message + "信息查询异常!");
            }
        }
Пример #33
0
        private void setStoveAsReturnBillet(string strStoveNo)
        {
            string strSQL = "update dt_bp_plan set FN_ISRETURNBILLET='1',FS_COMPLETEFLAG='0',";

            strSQL += "fs_order=(select to_number(max(fs_order))+1 from dt_bp_plan) where FS_STOVENO='" + strStoveNo + "'";
            CoreClientParam ccp = new CoreClientParam();

            ccp.ServerName   = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName   = "ExcuteNonQuery";
            ccp.ServerParams = new object[] { strSQL };
            this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);

            strSQL  = "update it_fp_techcard set FS_BATCHED='0',FS_BATCH_OPTOR=null,FS_BATCH_OPTDATE=null,fs_zc_batchno=null,";
            strSQL += "fs_batched_heatno=null,";
            strSQL += "FS_SOURCE_HEATNO=null,FS_SYS_BATCHNO=null where FS_GP_STOVENO='" + strStoveNo + "'";

            ccp.ServerParams = new object[] { strSQL };
            this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);

            strSQL  = "update it_fp_techcard set fs_batched_heatno=replace(replace(fs_batched_heatno,'" + strStoveNo + ",',''),'," + strStoveNo + "','')";
            strSQL += " where fs_batched_heatno like '%" + strStoveNo + "%'";

            ccp.ServerParams = new object[] { strSQL };
            this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);

            strSQL = "delete dt_zkd_plan where fs_stoveno='" + strStoveNo + "'";

            ccp.ServerParams = new object[] { strSQL };
            this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
        }
Пример #34
0
        private void DoUpdate()
        {
            if (DoCheck())
            {
                string p_OldPondTypeNo = "";
                string p_PondTypeNo    = tbPondTypeNo.Text.Trim();
                string p_PondTypeName  = tbPondTypeName.Text.Trim();

                UltraGridRow ugr = this.ultraGrid1.ActiveRow;
                if (ugr == null)
                {
                    p_OldPondTypeNo = p_PondTypeNo;
                }
                else
                {
                    p_OldPondTypeNo = ugr.Cells["FS_PONDTYPENO"].Text.Trim();
                }


                CoreClientParam ccp = new CoreClientParam();
                ccp.ServerName   = "ygjzjl.basedatamanage.PondTypeBaseInfo";
                ccp.MethodName   = "update";
                ccp.ServerParams = new object[] { p_OldPondTypeNo, p_PondTypeNo, p_PondTypeName };
                this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
                this.DoClear();
                this.DoQuery();
            }
        }
Пример #35
0
        private void DoUpdate()
        {
            if (DoCheck())
            {
                string p_OldPrinter = "";
                string p_Printer    = tbPrinter.Text.Trim();
                string p_Describe   = tbDescribe.Text.Trim();
                int    p_PaperNum   = Convert.ToInt32(tbPaperNum.Text.Trim());
                int    p_InkNum     = Convert.ToInt32(tbInkNum.Text.Trim());

                UltraGridRow ugr = this.ultraGrid1.ActiveRow;
                if (ugr == null)
                {
                    p_OldPrinter = p_Printer;
                }
                else
                {
                    p_OldPrinter = ugr.Cells["FS_PRINTTYPECODE"].Text.Trim();
                }


                CoreClientParam ccp = new CoreClientParam();
                ccp.ServerName   = "ygjzjl.basedatamanage.PrinterBaseInfo";
                ccp.MethodName   = "update";
                ccp.ServerParams = new object[] { p_OldPrinter, p_Printer, p_Describe, p_PaperNum, p_InkNum };
                this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
                this.DoClear();
                this.DoQuery();
            }
        }
Пример #36
0
        /// <summary>
        ///查询完整的数据
        /// </summary>
        private void ShowGridInfo()
        {
            TimeSpan ts = new TimeSpan(qDteBegin.Value.Hour, qDteBegin.Value.Minute, qDteBegin.Value.Second);
            qDteBegin.Value = qDteBegin.Value.Add(-ts);//默认当天的0时0分0秒为开始时间
            string beginTime = qDteBegin.Value.ToString("yyyyMMddHHmmss");
            string endTime = qDteBegin.Value.AddMinutes(Convert.ToDouble(1439)).ToString("yyyyMMddHHmmss");
            string stovno = txtLh.Text.Trim();
            string potno = txtGh.Text.Trim();

            ArrayList list = new ArrayList();
            dataSet1.Tables[0].Clear();
            list.Add(beginTime);
            list.Add(endTime);
            list.Add(beginTime);
            list.Add(endTime);
            txtLh.Text = "";
            txtGh.Text = "";
            CoreClientParam ccp = new CoreClientParam();
            if (stovno != string.Empty&&potno!=string.Empty)
            {
                list.Add(stovno);
                list.Add(potno);

                ccp.ServerName = "com.dbComm.DBComm";
                ccp.MethodName = "query";
                ccp.ServerParams = new object[] { "DATAMANAGE_01.SELECT", list };
                ccp.SourceDataTable = dataSet1.Tables[0];
                this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
                return;
            }
            if(stovno==string.Empty&&potno!=string.Empty)
            {
                list.Add(potno);

                ccp.ServerName = "com.dbComm.DBComm";
                ccp.MethodName = "query";
                ccp.ServerParams = new object[] { "DATAMANAGE_01_01.SELECT", list };
                ccp.SourceDataTable = dataSet1.Tables[0];
                this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
                return;
            }
            if (stovno!=string.Empty&&potno == string.Empty)
            {
                list.Add(stovno);

                ccp.ServerName = "com.dbComm.DBComm";
                ccp.MethodName = "query";
                ccp.ServerParams = new object[] { "DATAMANAGE_01_02.SELECT", list };
                ccp.SourceDataTable = dataSet1.Tables[0];
                this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
                return;
            }
            ccp.ServerName = "com.dbComm.DBComm";
            ccp.MethodName = "query";
            ccp.ServerParams = new object[] { "DATAMANAGE_01_03.SELECT", list };
            ccp.SourceDataTable = dataSet1.Tables[0];
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
        }
Пример #37
0
        private void AddRecord()
        {
            if (!checkItems())
            {
                return;
            }
            string strweightno = Guid.NewGuid().ToString();
            string strStoveSeatNo = (ultraOptionSet1.CheckedIndex + 1).ToString();
            string strStoveNo = txtStoveNo1.Text.Trim().Replace("'", "''");
            string strPotNo = txtPotNo.Text.Trim().Replace("'", "''");
            string strGrossWeight = txtGrossWeight.Text.Trim().Replace("'", "''");
            //string strTearWeight = txtTearWeight.Text.Trim().Replace("'", "''");
            //string strNetWeight = txtNetWeight.Text.Trim().Replace("'", "''");
            string strReceiveFac = (ultraOptionSet2.CheckedIndex + 1).ToString();
            //string strAddRecorder = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            string strAddRecorder = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName() + "手动新增";
            string strShift = Table_CA02_UserOrder.Static_T_CA02_UserOrder.GetUserOrderName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserOrder()).ToString();//班次
            string strGroup = Table_CA02_UserGroup.Static_T_CA02_UserGroup.GetUserGroupName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserGroup()).ToString();//班组
            ArrayList list = new ArrayList();
            list.Add(strStoveSeatNo);
            list.Add(strStoveNo);
            list.Add(strPotNo);
            list.Add(strGrossWeight);
            //list.Add(strTearWeight);
            //list.Add(strNetWeight);
            list.Add(strReceiveFac);
            list.Add(strAddRecorder);
            list.Add(strAddRecorder);
            list.Add(strShift);

            CoreClientParam ccp = new CoreClientParam();
            ccp.ServerName = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName = "ExcuteNonQuery";

            string sql = " INSERT INTO dt_statictrackfirstweight (FS_WEIGHTNO,FS_STOVESEATNO,FS_STOVENO,FS_POTNO,"
                              + "FN_WEIGHT,FS_WEIGHTTYPE,FS_WEIGHTPERSON"
                              + ",FD_WEIGHTTIME,FS_SHIFT,FS_GROUP,fs_weightpoint) VALUES ('"
                              + strweightno + " ','" + strStoveSeatNo + "','" + strStoveNo + "','" + strPotNo + "','" +
                              strGrossWeight + "','" + strReceiveFac + "','" +
                              strAddRecorder + "',sysdate,'" + strShift + "','" + strGroup + "','K38')";

            ccp.ServerParams = new object[] { sql };
            this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
            if (ccp.ReturnCode == 0)
            {
                MessageBox.Show("新增记录成功!");
                string strLog = "罐号=" + strPotNo + ",炉座号="//卡号、车号
            + strStoveSeatNo + ",炉号=" + strStoveNo + ",毛重="//物料、发货单位
            + strGrossWeight + ",流向=" + strReceiveFac + ",";
                this.objBi.WriteOperationLog("DT_STATICTRACKFIRSTWEIGHT", strDepartMent, strUserName, "增加", strLog, "数据修改", "静态铁水衡一次数据表", "静态铁水衡");//调用写操作日志方法

            }

            QueryData();
        }
Пример #38
0
 /// <summary>
 /// 根据订单号从SAP下载订单信息
 /// </summary>
 private void downOrderInfo(string sDdh)
 {
     DataTable dtOrder = new DataTable();
     CoreClientParam ccpProductNo = new CoreClientParam();
     ccpProductNo.ServerName = "ygjzjl.base.SapOperation";
     ccpProductNo.MethodName = "queryProductNo";
     ccpProductNo.ServerParams = new object[] { sDdh };
     dtOrder.Clear();
     ccpProductNo.SourceDataTable = dtOrder;
     this.ExecuteQueryToDataTable(ccpProductNo, CoreInvokeType.Internal);
 }
Пример #39
0
 private void getWeightInfo(string strEnterFacNo)
 {
     string strSelectSql = "select FS_WEIGHTNO,FN_GROSSWEIGHT,to_char(FD_GROSSDATETIME,'YYYY-MM-DD HH24:MI:SS') FD_GROSSDATETIME,FN_TAREWEIGHT,to_char(FD_TAREDATETIME,'YYYY-MM-DD HH24:MI:SS') FD_TAREDATETIME,FN_NETWEIGHT ";
     strSelectSql += "from DT_CARWEIGHT_WEIGHT where FS_ENTERFACNO='" + strEnterFacNo + "'";
     CoreClientParam selectccp = new CoreClientParam();
     selectccp.ServerName = "ygjzjl.carcard";
     selectccp.MethodName = "queryByClientSql";
     selectccp.ServerParams = new object[] { strSelectSql };
     dataSet1.Tables["车辆称重信息"].Clear();
     selectccp.SourceDataTable = dataSet1.Tables["车辆称重信息"];
     this.ExecuteQueryToDataTable(selectccp, CoreInvokeType.Internal);
 }
Пример #40
0
        private void Query()
        {
            string strQuerySql = "select FS_POINTCODE,FS_POINTNAME,FN_USEDPRINTPAPER FROM BT_POINT t where t.FS_POINTTYPE='QC' order by T.FS_POINTCODE ASC ";

            CoreClientParam ccp = new CoreClientParam();
            ccp.ServerName = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName = "ExcuteQuery";
            ccp.ServerParams = new object[] { strQuerySql };
            ccp.SourceDataTable = this.dataSet1.Tables[0];
            this.dataSet1.Tables[0].Clear();
            ccp = this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
        }
Пример #41
0
        //调用SAP的BAPI_GOODSMVT_CREATE
        public string BAPI_GOODSMVT_CREATE(string sCode, string[] sArrayHeader, ArrayList listSubItem)
        {
            ArrayList listItem = new ArrayList();
            CoreClientParam ccp = new CoreClientParam();

            strSapError = "";
            Array.Clear(strArrayUpload, 0, strArrayUpload.Length);
            listItem.Clear();
            listItem.Add(listSubItem);

            strArrayUpload[0] = listSubItem[0].ToString();

            if (sCode == "02")
            {
                strArrayUpload[3] = listSubItem[10].ToString();
                strArrayUpload[1] = "101";
                strArrayUpload[9] = listSubItem[9].ToString();
            }
            if (sCode == "03")
            {
                strArrayUpload[1] = "261";
                strArrayUpload[3] = listSubItem[7].ToString();
                strArrayUpload[9] = "0001";
            }
            strArrayUpload[4] = listSubItem[3].ToString();
            strArrayUpload[5] = Convert.ToDateTime(objBi.GetServerTime()).ToString("yyyy-MM-dd HH:mm:ss");
            strArrayUpload[7] = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            strArrayUpload[8] = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserID();

            strArrayUpload[10] = strArrayUpload[5];

            ccp.ServerName = "ygjzjl.sap.UploadSapRfc";

            if (sCode == "02")
                ccp.MethodName = "up_Product";
            if (sCode == "03")
                ccp.MethodName = "fl_Product";
            if (sCode == "04")
                ccp.MethodName = "up_BatchSplit";

            ccp.ServerParams = new object[] { "BAPI_GOODSMVT_CREATE", sArrayHeader, sCode, listItem };
            this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);

            if (ccp.ReturnCode == 0)
            {
                return ccp.ReturnObject.ToString();
            }
            else
            {
                return "";
            }
        }
Пример #42
0
 /// <summary>
 /// 执行存储过程2
 /// </summary>
 /// <param name="sql"></param>
 /// <param name="param"></param>
 /// <returns></returns>
 protected CoreClientParam excuteProcedure2(string sql, Hashtable param)
 {
     if (param == null)
     {
         param = new Hashtable();
     }
     CoreClientParam ccp = new CoreClientParam();
     ccp.ServerName = "com.dbComm.DBComm";
     ccp.MethodName = "executeProcedureBySql2";
     ccp.ServerParams = new object[] { sql, param };
     ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
     return ccp;
 }
Пример #43
0
        private void AddSubRecord(string strStoveNo, int i,string strTheorySingleWeight)
        {
            string strPerson = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName() +" 新增";
            string strSql = "insert into DT_STEELWEIGHTDETAILROLL (FS_WEIGHTNO,FS_STOVENO,FN_BILLETINDEX,FN_NETWEIGHT,FS_PERSON,FD_WEIGHTTIME) ";
            strSql += "values('" +Guid.NewGuid().ToString() + "','" + strStoveNo + "'," + i + "," + strTheorySingleWeight + ",'" + strPerson + "',";
            strSql+="sysdate)";

            CoreClientParam ccp = new CoreClientParam();
            ccp.ServerName = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName = "ExcuteNonQuery";
            ccp.ServerParams = new object[] { strSql };
            this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
        }
Пример #44
0
        public void BindData2Grid()
        {
            //由卡号带出绑定的车号
            string strCardIsExist = "select t.fs_sequenceno,t.FS_BINDCARNO from BT_CARDMANAGE t where t.fs_sequenceno='" + m_Reader.CardNo + "'";

            DataTable testdatatable = new DataTable();
            CoreClientParam selectccp = new CoreClientParam();
            selectccp.ServerName = "ygjzjl.carcard";
            selectccp.MethodName = "queryByClientSql";
            selectccp.ServerParams = new object[] { strCardIsExist };
            selectccp.SourceDataTable = testdatatable;
            this.ExecuteQueryToDataTable(selectccp, CoreInvokeType.Internal);
            if (testdatatable.Rows.Count == 0)
            {
                MessageBox.Show("该还未注册,不能使用!");
                return;
            }
            else
            {
                tbCardNo.Text = m_Reader.CardNo;
                tbCarNo.Text = testdatatable.Rows[0]["FS_BINDCARNO"].ToString();
            }

            if (isEnterFac(m_Reader.CardNo))
            {
                //出厂显示计量数据
                if (m_enterFacNo == string.Empty)
                {
                    MessageBox.Show("入厂流水号为空!");
                    return;
                }
                else
                {
                    showWeightInfo(m_enterFacNo);
                }
            }
            else
            {
                //进厂显示预报数据
                if (tbCarNo.Text == string.Empty)
                {
                    this.ultraGroupBox4.Visible = true;
                    this.ultraGroupBox3.Visible = false;
                }
                else
                {
                    showProdictInfo(tbCarNo.Text.Trim());
                }
            }
        }
Пример #45
0
        private void QueryFirstData()
        {
            string beginDate = dateTimePicker1.Value.ToString("yyyyMMdd0000");
            string endData = dateTimePicker4.Value.ToString("yyyyMMdd2359");

            //DataTable dt = new DataTable();
            CoreClientParam ccp = new CoreClientParam();
            ccp.ServerName = "com.dbComm.DBComm";
            ccp.MethodName = "query";
            ArrayList list = new ArrayList();
            list.Add(beginDate);
            list.Add(endData);
            if (!uce1.Checked && !uce2.Checked && !uce3.Checked)
            {
                list.Add("1");
                list.Add("2");
                list.Add("3");
            }
            else
            {
                string strStoveSeat1 = string.Empty;
                string strStoveSeat2 = string.Empty;
                string strStoveSeat3 = string.Empty;

                if (uce1.Checked)
                {
                    strStoveSeat1 = "1";
                }

                if (uce2.Checked)
                {
                    strStoveSeat2 = "2";
                }

                if (uce3.Checked)
                {
                    strStoveSeat3 = "3";
                }

                list.Add(strStoveSeat1);
                list.Add(strStoveSeat2);
                list.Add(strStoveSeat3);
            }
            dataSet1.Tables[2].Clear();
            ccp.ServerParams = new object[] { "FIRSTDATAQUERY_01.SELECT", list };
            ccp.SourceDataTable = dataSet1.Tables[2];
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
        }
Пример #46
0
        private void AddRecord()
        {
            if (!checkItems())
            {
                return;
            }

            string strStoveSeatNo = (ultraOptionSet1.CheckedIndex + 1).ToString();
            string strStoveNo = txtStoveNo1.Text.Trim().Replace("'", "''");
            string strPotNo = txtPotNo.Text.Trim().Replace("'", "''");
            string strGrossWeight = txtGrossWeight.Text.Trim().Replace("'", "''");
            string strTearWeight = txtTearWeight.Text.Trim().Replace("'", "''");
            string strNetWeight = txtNetWeight.Text.Trim().Replace("'", "''");
            string strReceiveFac = (ultraOptionSet2.CheckedIndex + 1).ToString();
            //string strAddRecorder = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName();
            string strAddRecorder = CoreFS.SA06.CoreUserInfo.UserInfo.GetUserName() + "手动新增";
            string strShift = Table_CA02_UserOrder.Static_T_CA02_UserOrder.GetUserOrderName(CoreFS.SA06.CoreUserInfo.UserInfo.GetUserOrder()).ToString();//班次

            ArrayList list = new ArrayList();
            list.Add(strStoveSeatNo);
            list.Add(strStoveNo);
            list.Add(strPotNo);
            list.Add(strGrossWeight);
            list.Add(strTearWeight);
            list.Add(strNetWeight);
            list.Add(strReceiveFac);
            list.Add(strAddRecorder);
            list.Add(strAddRecorder);
            list.Add(strShift);

            CoreClientParam ccp = new CoreClientParam();
            ccp.ServerName = "com.dbComm.DBComm";
            ccp.MethodName = "save";
            ccp.ServerParams = new object[] { "DATAMODIFY_01.ADD", list };
            this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
            if (ccp.ReturnCode == 0)
            {
                MessageBox.Show("新增记录成功!");
                string strLog = "罐号=" + strPotNo + ",炉座号="//卡号、车号
            + strStoveSeatNo + ",炉号=" + strStoveNo + ",毛重="//物料、发货单位
            + strGrossWeight + ",皮重=" + strTearWeight + ",净重="//卸货地点、承运单位
            + strNetWeight + ",流向=" + strReceiveFac + ",";
                this.objBi.WriteOperationLog("DT_IRONWEIGHT", strDepartMent, strUserName, "增加", strLog, "数据修改", "动态轨道衡二次数据表", "动态轨道衡");//调用写操作日志方法

            }

            QueryData();
        }
Пример #47
0
        private void DoAdd()
        {
            if (DoCheck())
            {
                string p_PondTypeNo = tbPondTypeNo.Text.Trim();
                string p_PondTypeName = tbPondTypeName.Text.Trim();

                CoreClientParam ccp = new CoreClientParam();
                ccp.ServerName = "ygjzjl.basedatamanage.PondTypeBaseInfo";
                ccp.MethodName = "add";
                ccp.ServerParams = new object[] { p_PondTypeNo, p_PondTypeName };
                this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
                this.DoClear();
                this.DoQuery();
            }
        }
Пример #48
0
        private void DoDelete()
        {
            if (strNumber == "")
            {
                MessageBox.Show("请先选择需要删除的记录");
                return;
            }

            string sql = "delete DT_COMPAREBALANCE where FS_NUMBER = '" + strNumber + "'";

            CoreClientParam ccp = new CoreClientParam();

            ccp.ServerName = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName = "ExcuteNonQuery";
            ccp.ServerParams = new object[] { sql };
            ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
        }
Пример #49
0
        private void DoDelete()
        {
            if (strTemp == "")
            {
                MessageBox.Show("请先选择需要删除的记录");
                return;
            }

            string sql = "delete BT_CORRENTION_POINT where FS_POINTCODE = '" + strTemp + "'";

            CoreClientParam ccp = new CoreClientParam();

            ccp.ServerName = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName = "ExcuteNonQuery";
            ccp.ServerParams = new object[] { sql };
            ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
        }
Пример #50
0
        private void DoAdd()
        {
            if (DoCheck())
            {
                string p_Shift = tbShift.Text.Trim();
                string p_StartTime = dateTimePicker1.Value.ToString("HH:mm:ss");
                string p_EndTime = dateTimePicker2.Value.ToString("HH:mm:ss");

                CoreClientParam ccp = new CoreClientParam();
                ccp.ServerName = "ygjzjl.basedatamanage.ShiftBaseInfo";
                ccp.MethodName = "add";
                ccp.ServerParams = new object[] { p_Shift, p_StartTime, p_EndTime };
                this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
                this.DoClear();
                this.DoQuery();
            }
        }
Пример #51
0
        private void Query()
        {
            string strBeginTime = this.dateTimePicker1.Value.ToString("yyyy-MM-dd HH:mm:ss");
            string strEndTime = this.dateTimePicker2.Value.ToString("yyyy-MM-dd HH:mm:ss");
            string strQuery = "select t.fs_batchno,t.fs_productno,t.fs_materialno,to_char(t.fd_starttime,'yyyy-MM-dd hh24:mi:ss') as fd_starttime"
                              + " from dt_productweightmain t where t.fs_uploadflag='1' and t.fs_materialno is null "
                              + "and (t.fd_starttime between to_date('" + strBeginTime + "','yyyy-MM-dd hh24:mi:ss') and to_date('" + strEndTime + "','yyyy-MM-dd hh24:mi:ss')) order by t.fd_starttime desc";
            string strTmpTable, strTmpField, strTmpOrder;
            this.dataSet1.Tables[0].Clear();
            CoreClientParam ccp = new CoreClientParam();
            ccp.ServerName = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName = "ExcuteQuery";
            ccp.ServerParams = new object[] { strQuery };
            ccp.SourceDataTable = dataSet1.Tables[0];

            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
        }
Пример #52
0
        private void DoAdd()
        {
            if (DoCheck())
            {
                string p_Printer = tbPrinter.Text.Trim();
                string p_Describe = tbDescribe.Text.Trim();
                int p_PaperNum = Convert.ToInt32(tbPaperNum.Text.Trim());
                int p_InkNum = Convert.ToInt32(tbInkNum.Text.Trim());

                CoreClientParam ccp = new CoreClientParam();
                ccp.ServerName = "ygjzjl.basedatamanage.PrinterBaseInfo";
                ccp.MethodName = "add";
                ccp.ServerParams = new object[] { p_Printer, p_Describe, p_PaperNum, p_InkNum };
                this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
                this.DoClear();
                this.DoQuery();
            }
        }
Пример #53
0
 /// <summary>
 /// 装载所有磅房信息
 /// </summary>
 /// <param name="dtBF"></param>
 /// <param name="PointType"></param>
 public void QueryBFData(string PointType)
 {
     CoreClientParam ccp = new CoreClientParam();
     ccp.ServerName = "ygjzjl.basedatamanage.QueryPointInfo";
     ccp.MethodName = "QueryBFData";
     ccp.ServerParams = new object[] { PointType };
     DataTable dtBF = new DataTable();
     ccp.SourceDataTable = dtBF;
     this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
     if (dtBF.Rows.Count > 0)
     {
         this.cbJLD.DataSource = dtBF;
         this.cbJLD.DisplayMember = "FS_POINTNAME";
         this.cbJLD.ValueMember = "FS_POINTCODE";
         this.cbJLD.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
         this.cbJLD.AutoCompleteSource = AutoCompleteSource.ListItems;
     }
 }
Пример #54
0
        private void Change()
        {
            if (this.tbBf.Text == "" || strPointCode == "")
            {
                MessageBox.Show("请双击选择需要换纸的数据记录行!");
                return;
            }
            if (DialogResult.Yes == MessageBox.Show("是否为 "+tbBf.Text+" 换纸", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
            {
                string strUpdateSql = "UPDATE BT_POINT T SET T.FN_USEDPRINTPAPER='0' where t.FS_POINTCODE='" + strPointCode + "'";

                CoreClientParam ccp = new CoreClientParam();
                ccp.ServerName = "ygjzjl.basedatamanage.OtherBaseInfo";
                ccp.MethodName = "ExcuteNonQuery";
                ccp.ServerParams = new object[] { strUpdateSql };

                ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
            }
        }
Пример #55
0
        public string getTotalWeight(string strStoveNo)
        {
            string strSql = "select sum(FN_NETWEIGHT) totalWeight from DT_STEELWEIGHTDETAILROLL where FS_STOVENO='" + strStoveNo + "'";
            DataTable dt = new DataTable();

            CoreClientParam ccp = new CoreClientParam();
            ccp.ServerName = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName = "ExcuteQuery";
            ccp.ServerParams = new object[] { strSql };
            ccp.SourceDataTable = dt;
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
            string strTotalWeight = string.Empty;
            if (dt.Rows.Count > 0)
            {
                strTotalWeight = dt.Rows[0]["totalWeight"].ToString();
            }

            return strTotalWeight;
        }
Пример #56
0
 private void ChangeShift_Load(object sender, EventArgs e)
 {
     DataTable dt = new DataTable();
     ArrayList list = new ArrayList();
     list.Add(_args);
     CoreClientParam ccp = new CoreClientParam();
     ccp.ServerName = "com.dbComm.DBComm";
     ccp.MethodName = "query";
     ccp.ServerParams = new object[] { "BILLETINFO_22.SELECT", list};
     ccp.SourceDataTable = dt;
     this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
     if (dt != null && dt.Rows.Count > 0)
     {
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             tbName.Items.Add(dt.Rows[i]["USERID"].ToString(),dt.Rows[i]["USERNAME"].ToString());
         }
     }
 }
Пример #57
0
        private void btnTemplateOk1_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            string strSql1 = @"select FS_FH,FS_SETTLEMENTNAME from IT_MRP_SETTLEMENT where FS_FH = '" + this.strCurrentMrpCode + "'";
            string strSql2 = "";
            CoreClientParam ccp = new CoreClientParam();
            ccp.ServerName = "ygjzjl.basedatamanage.OtherBaseInfo";
            ccp.MethodName = "ExcuteQuery";
            ccp.ServerParams = new object[] { strSql1 };
            ccp.SourceDataTable = dt;
            this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
            if (ccp.ReturnCode == 0)
            {
                if (dt.Rows.Count > 0)
                {
                    strSql2 = @"update IT_MRP_SETTLEMENT set FS_SETTLEMENTNAME='" + this.ugcpFS_SETTLEMENTNAME1.Text + "' where FS_FH = '" + this.strCurrentMrpCode + "'";
                    ;

                }
                else
                {
                    strSql2 = @"Insert into IT_MRP_SETTLEMENT (FS_FH,FS_SETTLEMENTNAME) values ('" + this.strCurrentMrpCode + "','" + this.ugcpFS_SETTLEMENTNAME1.Text + "')";
                }
                CoreClientParam ccp1 = new CoreClientParam();
                ccp1.ServerName = "ygjzjl.basedatamanage.OtherBaseInfo";
                ccp1.MethodName = "ExcuteNonQuery";
                ccp1.ServerParams = new object[] { strSql2 };
                ccp1 = this.ExecuteNonQuery(ccp1, CoreInvokeType.Internal);
                if (ccp1.ReturnCode == 0)
                {
                    MessageBox.Show("更新成功!");
                }
                else
                {
                    MessageBox.Show("更新失败!");
                    return;
                }
            }
            // This code was automatically generated by the RowEditTemplate Wizard
            //
            // Close the template and save any pending changes.
            this.ultraGridRowEditTemplate2.Close(true);
        }
Пример #58
0
 /// <summary>
 /// 获取计量点信息
 /// </summary>
 /// <param name="pointCode">计量点编号</param>
 /// <returns>计量点实体类</returns>
 public BT_POINT GetPoint(string pointCode)
 {
     BT_POINT point = null;
     DataTable dt = new DataTable();
     ArrayList param = new ArrayList();
     param.Add(pointCode);
     CoreClientParam ccp = new CoreClientParam();
     ccp.ServerName = "com.dbComm.DBComm";
     ccp.MethodName = "query";
     ccp.ServerParams = new object[] { "WEIGHPOINT_01.SELECT", param };
     ccp.SourceDataTable = dt;
     this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
     if (dt.Rows.Count > 0)
     {
         DataRow dr = dt.Rows[0];
         point = ConvertDataRowToPointObject(dr);
     }
     return point;
 }
Пример #59
0
 private DataTable GetWeightStd()
 {
     DataTable dt = new DataTable();
     try
     {
         string sql = @"SELECT T.FN_ID,T.FS_SPEC,T.FN_LENGTH,T.FN_WEIGHT,T.FN_BILLETCOUNT,T.FS_BUNDLEWEIGHT
                        ,T.FS_BUNDLEMINWWEIGHT,T.FS_BUNDLEMAXWWEIGHT,T.FS_MINDIFFERENTRATE,T.FS_MAXDIFFERENTRATE
                        FROM BT_BCTHEORYWEIGHTINFO T";
         CoreClientParam ccp = new CoreClientParam();
         ccp.ServerName = "ygjzjl.bar.StoreageWeight_BC";
         ccp.MethodName = "QueryTableData";
         ccp.ServerParams = new object[] { sql };
         ccp.SourceDataTable = dt;
         this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal);
     }
     catch (Exception e)
     {
     }
     return dt;
 }
Пример #60
0
 private void RenewWeightData()
 {
     if (MessageBox.Show("是否确定恢复采集的称重记录?", "玉钢MCMS", MessageBoxButtons.YesNo) == DialogResult.Yes)
     {
         ArrayList list = new ArrayList();
         foreach (Infragistics.Win.UltraWinGrid.UltraGridRow ugr in ultraGrid1.Rows)
         {
             if (Convert.ToBoolean(ugr.Cells["CHK"].Value))
             {
                 list.Add(ugr.Cells["FS_WEIGHTNO"].Value.ToString());
             }
         }
         CoreClientParam ccp = new CoreClientParam();
         ccp.ServerName = "ygjzjl.dynTrack.WeightMatch";
         ccp.MethodName = "RenewFirstData";
         ccp.ServerParams = new object[] { list, UserInfo.GetUserID() };
         this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
         this.QueryWeightData();
     }
 }