Beispiel #1
0
        public tb_JCH tb_JCHFind(string _sql, string _fieldsname)
        {
            tb_JCH jch  = new tb_JCH();
            Dblink dbl1 = new Dblink();

            string[] s = _fieldsname.Split(',');
            try
            {
                DataSet ds = dbl1.GetDataset(_sql);
                if (ds != null)
                {
                    if (ds.Tables.Count > 0)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            for (int i = 0; i < s.Length; i++)
                            {
                            }
                        }
                    }
                }

                return(jch);
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message.ToString());
                return(null);
            }
        }
Beispiel #2
0
        public int tb_JCHUpdate(tb_JCH JCH)
        {
            int intFalg = 0;

            try
            {
                string str_Update = "update tb_JCH set ";
                str_Update += "JCDate='" + JCH.dJCDate + "',";
                str_Update += "JCWorknum='" + JCH.strJCWorknum + "',JCOperator='" + JCH.strJCOperator + "',JCWareID='" + JCH.strJCWareID + "',JCGoodsID='" + JCH.strJCGoodsID + "',JCMaterial ='" + JCH.strJCMaterial + "',";
                str_Update += "JCHGSL= " + JCH.dJCHGSL + ",JCPSSL=" + JCH.dJCKHSL + ",JCKLSL=" + JCH.dJCKLSL + ",JCKHSL = " + JCH.dJCKHSL + ",JCCarNO='" + JCH.strJCCarNO + "',JCTYPE=" + JCH.intJCTYPE + ",FRYHGSL = " + JCH.dFRYHGSL + ",FHGL=" + JCH.dFHGL + ",FPSSL=" + JCH.iFPSSL + ",FPSL=" + JCH.dFPSL + ",FKilnNo='" + JCH.strFKilnNo + "'";
                str_Update += " where  JCSerialNum='" + JCH.strJCSerialNum + "'";

                intFalg = dbl.ExeInfochange(str_Update);
                return(intFalg);
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.ToString());
                return(intFalg);
            }
        }
Beispiel #3
0
        public int tb_JCHADD(tb_JCH JCH)
        {
            int intFalg = 0;

            try
            {
                string str_Add = "insert into tb_JCH(JCDate,JCWorknum,JCOperator,JCWareID,JCGoodsID,JCHGSL,JCPSSL,JCKLSL,JCKHSL,JCCarNO,JCTYPE,JCSerialNum,JCGoodsName,JCModelno,JCItemID,JCMaterial,FImagePath,FRYHGSL,FHGL,FZYID,FPSSL,FPSL,FKilnNo) values( ";
                str_Add += " '" + JCH.dJCDate + "','" + JCH.strJCWorknum + "',";
                str_Add += " '" + JCH.strJCOperator + "','" + JCH.strJCWareID + "','" + JCH.strJCGoodsID + "',";
                str_Add += JCH.dJCHGSL + "," + JCH.dJCPSSL + "," + JCH.dJCKLSL + "," + JCH.dJCKHSL + ",'";
                str_Add += JCH.strJCCarNO + "'," + JCH.intJCTYPE + ",'" + JCH.strJCSerialNum + "','" + JCH.strJCGoodsName + "','";
                str_Add += JCH.strJCModelno + "','" + JCH.strJCItemID + "','" + JCH.strJCMaterial + "','" + JCH.strFImagePath + "'," + JCH.dFRYHGSL + "," + JCH.dFHGL + "," + JCH.iFZYID + "," + JCH.iFPSSL + "," + JCH.dFPSL + ",'" + JCH.strFKilnNo + "')";
                intFalg  = dbl.ExeInfochange(str_Add);
                return(intFalg);
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.ToString());
                return(intFalg);
            }
        }