public static Declare Parse(String s) { 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[5] != "") { 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); }
public static Declare Parse(String s) { 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[5] != "") { 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; }