private void btnSave_Click(object sender, System.EventArgs e) { string[] col = { "nRewardType", "strItemCode", "strDescription", "dRewardsPoints", "dtValidStart", "dtValidEnd" }; object[] val = { cmb_Type.SelectedIndex, luedtItem.EditValue.ToString(), rewardDesc.Text.ToString(), dRewardsPoints.Text.ToString(), dtValidStart.EditValue, dtValidEnd.EditValue }; myCommon.Insert("TblRewardsCatalogue", col, val); this.Close(); }
private void btnSave_Click(object sender, System.EventArgs e) { string[] col = { "strPromotionCode", "nCategoryTypeID", "nGroupID", "strCode" }; object[] val = { luedtItemPromotion.EditValue.ToString(), CategoryTypeID.EditValue.ToString(), GroupID.EditValue.ToString(), this.luedtCode.EditValue.ToString() }; myCommon.Insert("TblItemPromotion", col, val); this.Close(); }
private void btnSave_Click(object sender, System.EventArgs e) { string bankbranch = (luedtBankBranch.EditValue != null ? luedtBankBranch.EditValue.ToString() : ""); string[] col = { "strMembershipID", "strPackageCode", "strBankCode", "strBankBranchCode", "strAccountNo", "strBranchCode", "nStatusID", "nEmployeeID", "strRemarks" }; object[] val = { ucMemberID1.EditValue.ToString(), luedtPackage.EditValue.ToString(), luedtBank.EditValue.ToString(), bankbranch, AccountNo.Text, luedtBranch.EditValue.ToString(), 1, nEmployeeID.ToString(), this.strRemarks.EditValue.ToString() }; myCommon.Insert("TblGIRO", col, val); this.Close(); }
private void btnSave_Click(object sender, System.EventArgs e) { string[] col = { "strMembershipID", "dtDate", "strDescription", "nCourse", "nHole", "nHandicap", "nScore" }; object[] val = { strMembershipID, txt_ActDate.EditValue, txt_ActDescription.Text, lk_ActCourse.EditValue.ToString(), txt_ActHole.Text, txt_ActHandicap.Text, txt_ActScore.Text }; try { myCommon.Insert("TblMemberActivities", col, val); } catch (Exception ex) { MessageBox.Show("Update Failed!, Error in values", "Error"); } this.Close(); }