protected void btnSaveUpdate_Click(object sender, EventArgs e) { fabric = FM.GetFabricByKey(long.Parse(gvFabricList.SelectedRow.Cells[2].Text)); fabric.FabricCode = txtFabricCodeUpdate.Text.ToUpper(); fabric.FabricDescription = txtFabricDescriptionUpdate.Text.ToUpper(); fabric.TopOrBottom = char .Parse(rdioTopOrBottomUpdate.SelectedValue); FM.Save(fabric); LoadAllFabrics(); }
protected void gvGarmentList_SelectedIndexChanged(object sender, EventArgs e) { fabric = FM.GetFabricByKey(long.Parse(gvFabricList.SelectedRow.Cells[2].Text)); txtFabricCodeUpdate.Text = fabric.FabricCode; txtFabricDescriptionUpdate.Text = fabric.FabricDescription; if (fabric.TopOrBottom == 'T') { rdioTopOrBottomUpdate.SelectedIndex = 0; } else { rdioTopOrBottomUpdate.SelectedIndex = 1; } }
protected void btnSaveFabric_Click(object sender, EventArgs e) { var fabric = new Fabric { FabricCode = txtFabricCode.Text.ToUpper(), FabricDescription = txtFabricDescription.Text.ToUpper(), TopOrBottom = char.Parse(rdioTopOrBottom.SelectedValue), DateCreated = DateTimeOffset.Now, IsActive = "Yes" }; FM.Save(fabric); txtFabricCode.Text = null; txtFabricDescription.Text = null; LoadAllFabrics(); }
protected void btnYes_Click(object sender, EventArgs e) { fabric = FM.GetFabricByKey(long.Parse(gvFabricList.SelectedRow.Cells[2].Text)); FM.Delete(fabric); LoadAllFabrics(); }