当前位置: 首页>>代码示例>>C#>>正文


C# DataAccess.updateActivityChangeRequest方法代码示例

本文整理汇总了C#中DataAccess.updateActivityChangeRequest方法的典型用法代码示例。如果您正苦于以下问题:C# DataAccess.updateActivityChangeRequest方法的具体用法?C# DataAccess.updateActivityChangeRequest怎么用?C# DataAccess.updateActivityChangeRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataAccess的用法示例。


在下文中一共展示了DataAccess.updateActivityChangeRequest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnSave_Click

    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            lblMsg.Text = "";
            hfPageInfo.Value = "0";
            hfFlgSave.Value = "";

            try
            {
                if (Request.QueryString.Get("acrId").Equals("-1"))
                {
                    //Add new Activity Request

                    DataAccess obj = new DataAccess();
                    //Local Plan id will be enter later, use 101 for now
                    int aId = Convert.ToInt32(Request.QueryString.Get("aid").ToString());

                    int key_acId = obj.insertNewActivity(aId,
                                          txtNewActivityName.Text,
                                          txtNewActivityDesc.Text,
                                          txtNewCoreIndicatorDesc.Text);

                    //Insert Core Indicator
                    if (key_acId > 0)
                    {
                        for (int i = 0; i < cblCoreIndicators.Items.Count; i++)
                            if (cblCoreIndicators.Items[i].Selected)
                                obj.insertNewNewCoreInd(key_acId,
                                                        aId,
                                                        Convert.ToInt32(cblCoreIndicators.Items[i].Value));
                    }

                    selectReturnForm(-1);
                }
                else
                {
                    //Update Current Activity Request

                    DataAccess obj = new DataAccess();
                    //Local Plan id will be enter later, use 101 for now
                    int aId = Convert.ToInt32(Request.QueryString.Get("aid").ToString());
                    int acId = Convert.ToInt32(Request.QueryString.Get("acrId").ToString());

                    obj.updateActivityChangeRequest(acId, aId,
                          txtNewActivityName.Text,
                          txtNewActivityDesc.Text,
                          txtNewCoreIndicatorDesc.Text,
                          cbApproved.Checked);

                    //Insert Core Indicator

                        for (int i = 0; i < cblCoreIndicators.Items.Count; i++)
                            if (cblCoreIndicators.Items[i].Selected)
                                obj.insertNewNewCoreInd(acId,
                                                        aId,
                                                        Convert.ToInt32(cblCoreIndicators.Items[i].Value));

                        //Approved by SO
                        if (cbApproved.Checked)
                        {
                            String returnVal = obj.approveChangeRequest(acId, aId);
                        }
                }
                scs_error_dictionary errObj = new scs_error_dictionary();

                if (errObj.LoadByPrimaryKey("200"))
                {
                    lblMsg.Text = errObj.Txt_message;
                }

            }
            catch
            {
                scs_error_dictionary errObj = new scs_error_dictionary();

                if (errObj.LoadByPrimaryKey("201"))
                {
                    lblMsg.Text = errObj.Txt_message;
                }
            }
        }
    }
开发者ID:sdemdouglas,项目名称:sdecateproject,代码行数:83,代码来源:ActivityChangeRequest.aspx.cs


注:本文中的DataAccess.updateActivityChangeRequest方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。