public void readCamperCSV() { grid = CSVReader.SplitCsvGrid(csvFile.text); int x = grid.GetUpperBound(0); int y = grid.GetUpperBound(1); int size = 0; optionsData od = new optionsData(); for (i = 0; i < x; i++) { if (grid [i, 0] != null && grid [i, 0].Length != 0) { currentData.text = grid [i, 0]; size = Int32.Parse(grid[i, 1]); for (j = 0; j < size; j++) { od.text = grid [i, j + 2]; od.nextIndex = Int32.Parse(grid [i, j + 2 + size]); od.economyChange = Int32.Parse(grid [i, j + 2 + size * 2]); currentData.options.Add(od); od = new optionsData(); } stateDataList.Add(currentData); currentData = new stateData(); } } }
public IHttpActionResult EditRepairOrderState(int id, stateData state) { var order = db.RepairOrders.Find(id); if (order == null) { return(NotFound()); } if (!Enum.IsDefined(typeof(RepairOrderState), state.State)) { return(NotFound()); } order.State = (RepairOrderState)state.State; db.Entry(order).State = EntityState.Modified; db.SaveChanges(); return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult EditEngineerRecycleOrderState(int id, stateData state) { var user = getCooikedUser(); var order = db.RecycleOrders.Find(id); if (order == null) { return(NotFound()); } if (!Enum.IsDefined(typeof(RecycleOrderState), state.State)) { return(NotFound()); } if (user.ID != order.Engineer_ID) { return(NotFound()); } order.State = (RecycleOrderState)state.State; db.Entry(order).State = EntityState.Modified; db.SaveChanges(); return(StatusCode(HttpStatusCode.OK)); }
private void Page_Load(object sender, System.EventArgs e) { if (!this.IsPostBack) { Utilities.SetTextBoxColor(this); stateData sd = new stateData( ); sd.addState(ddlState); sd.addState(ddlStateIssue); txtZip.Attributes.Add("onkeypress", "return maskKeyPress(event)"); txtZip.Attributes.Add("onchange", "maskChange(event)"); txtZip.Attributes.Add("onpaste", "return maskPaste(event)"); txtZip.Attributes.Add("reValidChars", @"\d|-"); txtZip.Attributes.Add("reValidString", @"(^\d{5}$)|(^\d{5}-\d{4}$)"); txtZip.Attributes.Add("size", "10"); txtZip.Attributes.Add("maxlength", "10"); txtZip.Attributes.Add("pattern", "zip"); txtPhoneHome.Attributes.Add("onkeypress", "return maskKeyPress(event)"); txtPhoneHome.Attributes.Add("onchange", "maskChange(event)"); txtPhoneHome.Attributes.Add("onpaste", "return maskPaste(event)"); txtPhoneHome.Attributes.Add("reValidChars", @"\d|-"); txtPhoneHome.Attributes.Add("reValidString", @"^\d{3}-\d{3}-\d{4}$"); txtPhoneHome.Attributes.Add("size", "12"); txtPhoneHome.Attributes.Add("maxlength", "12"); txtPhoneHome.Attributes.Add("pattern", "phone"); txtPhoneOther.Attributes.Add("onkeypress", "return maskKeyPress(event)"); txtPhoneOther.Attributes.Add("onchange", "maskChange(event)"); txtPhoneOther.Attributes.Add("onpaste", "return maskPaste(event)"); txtPhoneOther.Attributes.Add("reValidChars", @"\d|-"); txtPhoneOther.Attributes.Add("reValidString", @"^\d{3}-\d{3}-\d{4}$"); txtPhoneOther.Attributes.Add("size", "12"); txtPhoneOther.Attributes.Add("maxlength", "12"); txtPhoneOther.Attributes.Add("pattern", "phone"); } }
void Start() { list = new wordList[9]; stateDataList = new List <stateData> (); currentData = new stateData(); }