/// <summary> /// Convert slip no to MNumber /// </summary> /// <param name="target">Slip no</param> /// <returns>Slip no</returns> public static MNumber ToMNumber(string target) { // Local variable declaration MNumber result = null; var code = string.Empty; var year = string.Empty; var month = string.Empty; var strSlipNo = string.Empty; var slipNo = decimal.Zero; var digits = decimal.Zero; var notes = string.Empty; // Variable initialize result = new MNumber(); strSlipNo = target.Substring(6); // Check param if (DataCheckHelper.IsNull(target) || target.Length < 10) throw new ParamInvalidException(); // Get info code = target.Substring(0, 2); year = target.Substring(2, 2); month = target.Substring(4, 2); slipNo = Convert.ToDecimal(strSlipNo); digits = strSlipNo.Length; // Set value result.Code = code; result.Year = year; result.Month = month; result.SlipNo = slipNo; result.Digits = digits; result.Notes = notes; // Return value return result; }
partial void UpdateMNumber(MNumber instance);
partial void DeleteMNumber(MNumber instance);
partial void InsertMNumber(MNumber instance);