Exemplo n.º 1
0
 //���걨
 public static void C_NewDeclare(Declare dec)
 {
     StringBuilder stb = new StringBuilder(Constant.HEAD).Append(Constant.C_DECLARE).Append(Constant.C_DECLARE_NEW);
     stb.Append(dec.ToString()).Append(Constant.FOOT);
     dataSocket.Send(stb.ToString());
 }
Exemplo n.º 2
0
 public static Declare Parse(String s)
 {
     try
     {
         Declare dec = new Declare();
         String[] ss = s.Split(Constant.SPLIT2);
         dec.DeclareID = Int32.Parse(ss[0]);
         dec.ReferDate = ss[1];
         dec.ReferUser = ss[2];
         dec.CarID = Int32.Parse(ss[3]);
         dec.DeclareContent = ss[4];
         if(ss[6] != "0")
         {
             dec.OpUser = ss[5];
             dec.Operation = ss[6];
             dec.Fittings = ss[7];
             dec.OpDate = ss[8];
             dec.Mechanic = ss[9];
             dec.Satisfaction = Int32.Parse(ss[10]);
             dec.opinion = ss[11];
         }
         return dec;
     }
     catch { return null; }
 }