예제 #1
0
        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.Update("TblItemPromotion", col, val, "strPromotionCode = '" + PromotionCode + "' And strCode = '" + Code + "'");
            this.Close();
        }
예제 #2
0
        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.Update("TblRewardsCatalogue", col, val, "pkItemCode=" + pkItemCode + "");

            this.Close();
        }
예제 #3
0
        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.Update("TblMemberActivities", col, val, "strMembershipID= N'" + strMembershipID + "' And dtDate= convert(DateTime, '" + txt_ActDate.EditValue.ToString() + "', 103) And nCourse=" + nCourse);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Update Failed!, Error in values", "Error");
            }
            this.Close();
        }