cnandha19
Member level 3
When 2 Pressed,
Delete Product : 1. Yes / 2. No
If 1 pressed,
Confirm : 1.Yes / 2. No
If 1 pressed, delete product Info
is it correct way ??Delete Product : 1. Yes / 2. No
If 1 pressed,
Confirm : 1.Yes / 2. No
If 1 pressed, delete product Info
Code:
int deleteproductrecords();
int deleteproductrecords()
{
int ret =0;
lcdClear();
lcdMoveCursor(0,0);
lcdPrintStr("Delete Product rec:");
lcdMoveCursor(1,6);
lcdPrintStr("1.Yes:");
lcdMoveCursor(2,6);
lcdPrintStr("2.No:");
while(1)
{
ret = READ_SWITCHES();
if(ret == '1')
{
lcdClear();
lcdMoveCursor(0,0);
lcdPrintStr("Delete product rec:");
lcdMoveCursor(2,7);
lcdPrintStr("1.Yes");
}
if(ret == enterkeystore)
{
lcdClear();
lcdMoveCursor(0,0);
lcdPrintStr("Delete product rec:");
lcdMoveCursor(2,7);
lcdPrintStr("Deleted");
}
if(ret == nextkeystore)
{
lcdClear();
lcdMoveCursor(0,0);
lcdPrintStr("Delete product rec:");
lcdMoveCursor(2,7);
lcdPrintStr(" Not Deleted");
}
if(ret == '2')
{
lcdClear();
lcdMoveCursor(0,0);
lcdPrintStr("Delete product rec:");
lcdMoveCursor(2,7);
lcdPrintStr("2.No");
}
else if(ret == '3')
{
return;
}
}
}