コード例 #1
0
 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();
 }
コード例 #2
0
 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;
     }
 }
コード例 #3
0
 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();
 }
コード例 #4
0
 protected void btnYes_Click(object sender, EventArgs e)
 {
     fabric = FM.GetFabricByKey(long.Parse(gvFabricList.SelectedRow.Cells[2].Text));
     FM.Delete(fabric);
     LoadAllFabrics();
 }