What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 32327 |  Welcome, Guest!   Register  Login
  Home > Community Home >

problem with enums

 Author: vikaskolluri | Posted on: 6/10/2008 7:30:16 AM | Views: 50

Recommend an Articles | Recommended Articles | Search Resources | Community Home |




 Hi,
I am using enums in my project to save the mode of the grid. Code snippet is as follows:
 
public enum SheetModes
    {
        View = 1,
        Add  ,
        Edit

    }

SheetModes Mode;
 There are 3 buttons on the page namely, Create, Load, Edit and Save

In Create Button  click,    Mode= SheetModes.Add;
In Load Button Click,  Mode= SheetModes.View;
In edit button click, I am setting the Mode to SheetModes.Edit; 
in Save button click, I need to check the mode and execute insert or update functions. But when ever I set the value and load the page, the value to the Mode is lost, its set to 0 and am unable to check the Mode in the Save Button Click.
I am not sure whe ... Go to the complete details ...

Found interesting? Add this to:


About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/22/2013 8:42:12 AM